Debian Codegraph @

api/vpc/v2/vpc_sdk.go

raw symbols SCIP
1 // This file was automatically generated. DO NOT EDIT.
2 // If you have any remark or suggestion do not hesitate to open an issue.
3
4 // Package vpc provides methods and message types of the vpc v2 API.
5 package vpcscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/
6
7 import (
8 "bytesscip-go gomod github.com/golang/go/src go1.17 bytes/"
9 "encoding/jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/"
10 "fmtscip-go gomod github.com/golang/go/src go1.17 fmt/"
11 "netscip-go gomod github.com/golang/go/src go1.17 net/"
12 "net/httpscip-go gomod github.com/golang/go/src go1.17 `net/http`/"
13 "net/urlscip-go gomod github.com/golang/go/src go1.17 `net/url`/"
14 "stringsscip-go gomod github.com/golang/go/src go1.17 strings/"
15 "timescip-go gomod github.com/golang/go/src go1.17 time/"
16
17 "github.com/scaleway/scaleway-sdk-go/errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/"
18 "github.com/scaleway/scaleway-sdk-go/marshalerscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/marshaler`/"
19 "github.com/scaleway/scaleway-sdk-go/namegeneratorscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/"
20 "github.com/scaleway/scaleway-sdk-go/parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/"
21 "github.com/scaleway/scaleway-sdk-go/scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/"
22 )
23
24 // always import dependencies
25 var (
26 _ fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Stringerscip-go gomod github.com/golang/go/src go1.17 fmt/Stringer#
27 _ jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/.Unmarshalerscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/Unmarshaler#
28 _ urlscip-go gomod github.com/golang/go/src go1.17 `net/url`/.URLscip-go gomod github.com/golang/go/src go1.17 `net/url`/URL#
29 _ netscip-go gomod github.com/golang/go/src go1.17 net/.IPscip-go gomod github.com/golang/go/src go1.17 net/IP#
30 _ httpscip-go gomod github.com/golang/go/src go1.17 `net/http`/.Headerscip-go gomod github.com/golang/go/src go1.17 `net/http`/Header#
31 _ bytesscip-go gomod github.com/golang/go/src go1.17 bytes/.Readerscip-go gomod github.com/golang/go/src go1.17 bytes/Reader#
32 _ timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time#
33 _ = stringsscip-go gomod github.com/golang/go/src go1.17 strings/.Joinscip-go gomod github.com/golang/go/src go1.17 strings/Join().
34
35 _ scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#
36 _ marshalerscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/marshaler`/.Durationscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/marshaler`/Duration#
37 _ scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Filescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/File#
38 _ = parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().
39 _ = namegeneratorscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/.GetRandomNamescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/GetRandomName().
40 )
41
42 type ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy# string
43
44 const (
45 ListPrivateNetworksRequestOrderByCreatedAtAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderByCreatedAtAsc. = ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#("created_at_asc")
46 ListPrivateNetworksRequestOrderByCreatedAtDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderByCreatedAtDesc. = ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#("created_at_desc")
47 ListPrivateNetworksRequestOrderByNameAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderByNameAsc. = ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#("name_asc")
48 ListPrivateNetworksRequestOrderByNameDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderByNameDesc. = ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#("name_desc")
49 )
50
51 func (enum ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#) Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#String().() string {
52 if enum == "" {
53 // return default value if empty
54 return "created_at_asc"
55 }
56 return string(enum)
57 }
58
59 func (enum ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#) Valuesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#Values().() []ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy# {
60 return []ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#{
61 "created_at_asc",
62 "created_at_desc",
63 "name_asc",
64 "name_desc",
65 }
66 }
67
68 func (enum ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#) MarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#MarshalJSON().() ([]byte, error) {
69 return []byte(fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.17 fmt/Sprintf().(`"%s"`, enum)), nil
70 }
71
72 func (enum *ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#) UnmarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#UnmarshalJSON().(data []byte) error {
73 tmp := ""
74
75 if err := jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/Unmarshal().(data, &tmp); err != nil {
76 return err
77 }
78
79 *enum = ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#(ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#(tmp).Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy#String().())
80 return nil
81 }
82
83 type ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy# string
84
85 const (
86 ListRoutesWithNexthopRequestOrderByCreatedAtAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderByCreatedAtAsc. = ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#("created_at_asc")
87 ListRoutesWithNexthopRequestOrderByCreatedAtDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderByCreatedAtDesc. = ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#("created_at_desc")
88 ListRoutesWithNexthopRequestOrderByDestinationAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderByDestinationAsc. = ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#("destination_asc")
89 ListRoutesWithNexthopRequestOrderByDestinationDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderByDestinationDesc. = ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#("destination_desc")
90 ListRoutesWithNexthopRequestOrderByPrefixLenAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderByPrefixLenAsc. = ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#("prefix_len_asc")
91 ListRoutesWithNexthopRequestOrderByPrefixLenDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderByPrefixLenDesc. = ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#("prefix_len_desc")
92 )
93
94 func (enum ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#) Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#String().() string {
95 if enum == "" {
96 // return default value if empty
97 return "created_at_asc"
98 }
99 return string(enum)
100 }
101
102 func (enum ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#) Valuesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#Values().() []ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy# {
103 return []ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#{
104 "created_at_asc",
105 "created_at_desc",
106 "destination_asc",
107 "destination_desc",
108 "prefix_len_asc",
109 "prefix_len_desc",
110 }
111 }
112
113 func (enum ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#) MarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#MarshalJSON().() ([]byte, error) {
114 return []byte(fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.17 fmt/Sprintf().(`"%s"`, enum)), nil
115 }
116
117 func (enum *ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#) UnmarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#UnmarshalJSON().(data []byte) error {
118 tmp := ""
119
120 if err := jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/Unmarshal().(data, &tmp); err != nil {
121 return err
122 }
123
124 *enum = ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#(ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#(tmp).Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy#String().())
125 return nil
126 }
127
128 type ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy# string
129
130 const (
131 ListSubnetsRequestOrderByCreatedAtAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderByCreatedAtAsc. = ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#("created_at_asc")
132 ListSubnetsRequestOrderByCreatedAtDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderByCreatedAtDesc. = ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#("created_at_desc")
133 )
134
135 func (enum ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#) Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#String().() string {
136 if enum == "" {
137 // return default value if empty
138 return "created_at_asc"
139 }
140 return string(enum)
141 }
142
143 func (enum ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#) Valuesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#Values().() []ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy# {
144 return []ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#{
145 "created_at_asc",
146 "created_at_desc",
147 }
148 }
149
150 func (enum ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#) MarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#MarshalJSON().() ([]byte, error) {
151 return []byte(fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.17 fmt/Sprintf().(`"%s"`, enum)), nil
152 }
153
154 func (enum *ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#) UnmarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#UnmarshalJSON().(data []byte) error {
155 tmp := ""
156
157 if err := jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/Unmarshal().(data, &tmp); err != nil {
158 return err
159 }
160
161 *enum = ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#(ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#(tmp).Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy#String().())
162 return nil
163 }
164
165 type ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy# string
166
167 const (
168 ListVPCsRequestOrderByCreatedAtAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderByCreatedAtAsc. = ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#("created_at_asc")
169 ListVPCsRequestOrderByCreatedAtDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderByCreatedAtDesc. = ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#("created_at_desc")
170 ListVPCsRequestOrderByNameAscscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderByNameAsc. = ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#("name_asc")
171 ListVPCsRequestOrderByNameDescscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderByNameDesc. = ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#("name_desc")
172 )
173
174 func (enum ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#) Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#String().() string {
175 if enum == "" {
176 // return default value if empty
177 return "created_at_asc"
178 }
179 return string(enum)
180 }
181
182 func (enum ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#) Valuesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#Values().() []ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy# {
183 return []ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#{
184 "created_at_asc",
185 "created_at_desc",
186 "name_asc",
187 "name_desc",
188 }
189 }
190
191 func (enum ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#) MarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#MarshalJSON().() ([]byte, error) {
192 return []byte(fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.17 fmt/Sprintf().(`"%s"`, enum)), nil
193 }
194
195 func (enum *ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#) UnmarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#UnmarshalJSON().(data []byte) error {
196 tmp := ""
197
198 if err := jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/Unmarshal().(data, &tmp); err != nil {
199 return err
200 }
201
202 *enum = ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#(ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#(tmp).Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy#String().())
203 return nil
204 }
205
206 type RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType# string
207
208 const (
209 RouteWithNexthopResourceTypeUnknownTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceTypeUnknownType. = RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#("unknown_type")
210 RouteWithNexthopResourceTypeVpcGatewayNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceTypeVpcGatewayNetwork. = RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#("vpc_gateway_network")
211 RouteWithNexthopResourceTypeInstancePrivateNicscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceTypeInstancePrivateNic. = RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#("instance_private_nic")
212 RouteWithNexthopResourceTypeBaremetalPrivateNicscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceTypeBaremetalPrivateNic. = RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#("baremetal_private_nic")
213 )
214
215 func (enum RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#) Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#String().() string {
216 if enum == "" {
217 // return default value if empty
218 return "unknown_type"
219 }
220 return string(enum)
221 }
222
223 func (enum RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#) Valuesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#Values().() []RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType# {
224 return []RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#{
225 "unknown_type",
226 "vpc_gateway_network",
227 "instance_private_nic",
228 "baremetal_private_nic",
229 }
230 }
231
232 func (enum RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#) MarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#MarshalJSON().() ([]byte, error) {
233 return []byte(fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.17 fmt/Sprintf().(`"%s"`, enum)), nil
234 }
235
236 func (enum *RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#) UnmarshalJSONscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#UnmarshalJSON().(data []byte) error {
237 tmp := ""
238
239 if err := jsonscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.17 `encoding/json`/Unmarshal().(data, &tmp); err != nil {
240 return err
241 }
242
243 *enum = RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#(RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#(tmp).Stringscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType#String().())
244 return nil
245 }
246
247 // Subnet: subnet.
248 type Subnetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet# struct {
249 // ID: ID of the subnet.
250 IDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet#ID. string `json:"id"`
251
252 // CreatedAt: subnet creation date.
253 CreatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet#CreatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"created_at"`
254
255 // UpdatedAt: subnet last modification date.
256 UpdatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet#UpdatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"updated_at"`
257
258 // Subnet: subnet CIDR.
259 Subnetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet#Subnet. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"subnet"`
260
261 // ProjectID: scaleway Project the subnet belongs to.
262 ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet#ProjectID. string `json:"project_id"`
263
264 // PrivateNetworkID: private Network the subnet belongs to.
265 PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet#PrivateNetworkID. string `json:"private_network_id"`
266
267 // VpcID: vPC the subnet belongs to.
268 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet#VpcID. string `json:"vpc_id"`
269 }
270
271 // PrivateNetwork: private network.
272 type PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork# struct {
273 // ID: private Network ID.
274 IDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#ID. string `json:"id"`
275
276 // Name: private Network name.
277 Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#Name. string `json:"name"`
278
279 // OrganizationID: scaleway Organization the Private Network belongs to.
280 OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#OrganizationID. string `json:"organization_id"`
281
282 // ProjectID: scaleway Project the Private Network belongs to.
283 ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#ProjectID. string `json:"project_id"`
284
285 // Region: region in which the Private Network is available.
286 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"region"`
287
288 // Tags: tags of the Private Network.
289 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#Tags. []string `json:"tags"`
290
291 // CreatedAt: date the Private Network was created.
292 CreatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#CreatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"created_at"`
293
294 // UpdatedAt: date the Private Network was last modified.
295 UpdatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#UpdatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"updated_at"`
296
297 // Subnets: private Network subnets.
298 Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#Subnets. []*Subnetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet# `json:"subnets"`
299
300 // VpcID: vPC the Private Network belongs to.
301 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#VpcID. string `json:"vpc_id"`
302
303 // DHCPEnabled: defines whether managed DHCP is enabled for this Private Network.
304 DHCPEnabledscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#DHCPEnabled. bool `json:"dhcp_enabled"`
305 }
306
307 // Route: route.
308 type Routescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route# struct {
309 // ID: route ID.
310 IDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#ID. string `json:"id"`
311
312 // Description: route description.
313 Descriptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#Description. string `json:"description"`
314
315 // Tags: tags of the Route.
316 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#Tags. []string `json:"tags"`
317
318 // VpcID: vPC the Route belongs to.
319 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#VpcID. string `json:"vpc_id"`
320
321 // Destination: destination of the Route.
322 Destinationscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#Destination. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"destination"`
323
324 // NexthopResourceID: ID of the nexthop resource.
325 NexthopResourceIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#NexthopResourceID. *string `json:"nexthop_resource_id"`
326
327 // NexthopPrivateNetworkID: ID of the nexthop private network.
328 NexthopPrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#NexthopPrivateNetworkID. *string `json:"nexthop_private_network_id"`
329
330 // CreatedAt: date the Route was created.
331 CreatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#CreatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"created_at"`
332
333 // UpdatedAt: date the Route was last modified.
334 UpdatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#UpdatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"updated_at"`
335
336 // IsReadOnly: defines whether the route can be modified or deleted by the user.
337 IsReadOnlyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#IsReadOnly. bool `json:"is_read_only"`
338
339 // Region: region of the Route.
340 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"region"`
341 }
342
343 // RouteWithNexthop: route with nexthop.
344 type RouteWithNexthopscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthop# struct {
345 // Route: route.
346 Routescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthop#Route. *Routescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route# `json:"route"`
347
348 // NexthopIP: IP of the route's next hop.
349 NexthopIPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthop#NexthopIP. *netscip-go gomod github.com/golang/go/src go1.17 net/.IPscip-go gomod github.com/golang/go/src go1.17 net/IP# `json:"nexthop_ip"`
350
351 // NexthopName: name of the route's next hop.
352 NexthopNamescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthop#NexthopName. *string `json:"nexthop_name"`
353
354 // NexthopResourceType: resource type of the route's next hop.
355 // Default value: unknown_type
356 NexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthop#NexthopResourceType. RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType# `json:"nexthop_resource_type"`
357 }
358
359 // VPC: vpc.
360 type VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC# struct {
361 // ID: vPC ID.
362 IDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#ID. string `json:"id"`
363
364 // Name: vPC name.
365 Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#Name. string `json:"name"`
366
367 // OrganizationID: scaleway Organization the VPC belongs to.
368 OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#OrganizationID. string `json:"organization_id"`
369
370 // ProjectID: scaleway Project the VPC belongs to.
371 ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#ProjectID. string `json:"project_id"`
372
373 // Region: region of the VPC.
374 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"region"`
375
376 // Tags: tags for the VPC.
377 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#Tags. []string `json:"tags"`
378
379 // IsDefault: defines whether the VPC is the default one for its Project.
380 IsDefaultscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#IsDefault. bool `json:"is_default"`
381
382 // CreatedAt: date the VPC was created.
383 CreatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#CreatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"created_at"`
384
385 // UpdatedAt: date the VPC was last modified.
386 UpdatedAtscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#UpdatedAt. *timescip-go gomod github.com/golang/go/src go1.17 time/.Timescip-go gomod github.com/golang/go/src go1.17 time/Time# `json:"updated_at"`
387
388 // PrivateNetworkCount: number of Private Networks within this VPC.
389 PrivateNetworkCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#PrivateNetworkCount. uint32 `json:"private_network_count"`
390
391 // RoutingEnabled: defines whether the VPC routes traffic between its Private Networks.
392 RoutingEnabledscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#RoutingEnabled. bool `json:"routing_enabled"`
393 }
394
395 // AddSubnetsRequest: add subnets request.
396 type AddSubnetsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest# struct {
397 // Region: region to target. If none is passed will use default region from the config.
398 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
399
400 // PrivateNetworkID: private Network ID.
401 PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#PrivateNetworkID. string `json:"-"`
402
403 // Subnets: private Network subnets CIDR.
404 Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#Subnets. []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"subnets"`
405 }
406
407 // AddSubnetsResponse: add subnets response.
408 type AddSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsResponse# struct {
409 Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsResponse#Subnets. []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"subnets"`
410 }
411
412 // CreatePrivateNetworkRequest: create private network request.
413 type CreatePrivateNetworkRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest# struct {
414 // Region: region to target. If none is passed will use default region from the config.
415 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
416
417 // Name: name for the Private Network.
418 Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Name. string `json:"name"`
419
420 // ProjectID: scaleway Project in which to create the Private Network.
421 ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#ProjectID. string `json:"project_id"`
422
423 // Tags: tags for the Private Network.
424 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Tags. []string `json:"tags"`
425
426 // Subnets: private Network subnets CIDR.
427 Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Subnets. []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"subnets"`
428
429 // VpcID: vPC in which to create the Private Network.
430 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#VpcID. *string `json:"vpc_id,omitempty"`
431 }
432
433 // CreateRouteRequest: create route request.
434 type CreateRouteRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest# struct {
435 // Region: region to target. If none is passed will use default region from the config.
436 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
437
438 // Description: route description.
439 Descriptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#Description. string `json:"description"`
440
441 // Tags: tags of the Route.
442 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#Tags. []string `json:"tags"`
443
444 // VpcID: vPC the Route belongs to.
445 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#VpcID. string `json:"vpc_id"`
446
447 // Destination: destination of the Route.
448 Destinationscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#Destination. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"destination"`
449
450 // NexthopResourceID: ID of the nexthop resource.
451 NexthopResourceIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#NexthopResourceID. *string `json:"nexthop_resource_id,omitempty"`
452
453 // NexthopPrivateNetworkID: ID of the nexthop private network.
454 NexthopPrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#NexthopPrivateNetworkID. *string `json:"nexthop_private_network_id,omitempty"`
455 }
456
457 // CreateVPCRequest: create vpc request.
458 type CreateVPCRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest# struct {
459 // Region: region to target. If none is passed will use default region from the config.
460 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
461
462 // Name: name for the VPC.
463 Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#Name. string `json:"name"`
464
465 // ProjectID: scaleway Project in which to create the VPC.
466 ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#ProjectID. string `json:"project_id"`
467
468 // Tags: tags for the VPC.
469 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#Tags. []string `json:"tags"`
470
471 // EnableRouting: enable routing between Private Networks in the VPC.
472 EnableRoutingscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#EnableRouting. bool `json:"enable_routing"`
473 }
474
475 // DeletePrivateNetworkRequest: delete private network request.
476 type DeletePrivateNetworkRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest# struct {
477 // Region: region to target. If none is passed will use default region from the config.
478 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
479
480 // PrivateNetworkID: private Network ID.
481 PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest#PrivateNetworkID. string `json:"-"`
482 }
483
484 // DeleteRouteRequest: delete route request.
485 type DeleteRouteRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest# struct {
486 // Region: region to target. If none is passed will use default region from the config.
487 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
488
489 // RouteID: route ID.
490 RouteIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest#RouteID. string `json:"-"`
491 }
492
493 // DeleteSubnetsRequest: delete subnets request.
494 type DeleteSubnetsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest# struct {
495 // Region: region to target. If none is passed will use default region from the config.
496 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
497
498 // PrivateNetworkID: private Network ID.
499 PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#PrivateNetworkID. string `json:"-"`
500
501 // Subnets: private Network subnets CIDR.
502 Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#Subnets. []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"subnets"`
503 }
504
505 // DeleteSubnetsResponse: delete subnets response.
506 type DeleteSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsResponse# struct {
507 Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsResponse#Subnets. []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"subnets"`
508 }
509
510 // DeleteVPCRequest: delete vpc request.
511 type DeleteVPCRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest# struct {
512 // Region: region to target. If none is passed will use default region from the config.
513 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
514
515 // VpcID: vPC ID.
516 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest#VpcID. string `json:"-"`
517 }
518
519 // EnableDHCPRequest: enable dhcp request.
520 type EnableDHCPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest# struct {
521 // Region: region to target. If none is passed will use default region from the config.
522 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
523
524 // PrivateNetworkID: private Network ID.
525 PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest#PrivateNetworkID. string `json:"-"`
526 }
527
528 // EnableRoutingRequest: enable routing request.
529 type EnableRoutingRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest# struct {
530 // Region: region to target. If none is passed will use default region from the config.
531 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
532
533 // VpcID: vPC ID.
534 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest#VpcID. string `json:"-"`
535 }
536
537 // GetPrivateNetworkRequest: get private network request.
538 type GetPrivateNetworkRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest# struct {
539 // Region: region to target. If none is passed will use default region from the config.
540 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
541
542 // PrivateNetworkID: private Network ID.
543 PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest#PrivateNetworkID. string `json:"-"`
544 }
545
546 // GetRouteRequest: get route request.
547 type GetRouteRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest# struct {
548 // Region: region to target. If none is passed will use default region from the config.
549 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
550
551 // RouteID: route ID.
552 RouteIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest#RouteID. string `json:"-"`
553 }
554
555 // GetVPCRequest: get vpc request.
556 type GetVPCRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest# struct {
557 // Region: region to target. If none is passed will use default region from the config.
558 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
559
560 // VpcID: vPC ID.
561 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest#VpcID. string `json:"-"`
562 }
563
564 // ListPrivateNetworksRequest: list private networks request.
565 type ListPrivateNetworksRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest# struct {
566 // Region: region to target. If none is passed will use default region from the config.
567 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
568
569 // OrderBy: sort order of the returned Private Networks.
570 // Default value: created_at_asc
571 OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#OrderBy. ListPrivateNetworksRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequestOrderBy# `json:"-"`
572
573 // Page: page number to return, from the paginated results.
574 Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Page. *int32 `json:"-"`
575
576 // PageSize: maximum number of Private Networks to return per page.
577 PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#PageSize. *uint32 `json:"-"`
578
579 // Name: name to filter for. Only Private Networks with names containing this string will be returned.
580 Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Name. *string `json:"-"`
581
582 // Tags: tags to filter for. Only Private Networks with one or more matching tags will be returned.
583 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Tags. []string `json:"-"`
584
585 // OrganizationID: organization ID to filter for. Only Private Networks belonging to this Organization will be returned.
586 OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#OrganizationID. *string `json:"-"`
587
588 // ProjectID: project ID to filter for. Only Private Networks belonging to this Project will be returned.
589 ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#ProjectID. *string `json:"-"`
590
591 // PrivateNetworkIDs: private Network IDs to filter for. Only Private Networks with one of these IDs will be returned.
592 PrivateNetworkIDsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#PrivateNetworkIDs. []string `json:"-"`
593
594 // VpcID: vPC ID to filter for. Only Private Networks belonging to this VPC will be returned.
595 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#VpcID. *string `json:"-"`
596
597 // DHCPEnabled: DHCP status to filter for. When true, only Private Networks with managed DHCP enabled will be returned.
598 DHCPEnabledscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#DHCPEnabled. *bool `json:"-"`
599 }
600
601 // ListPrivateNetworksResponse: list private networks response.
602 type ListPrivateNetworksResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse# struct {
603 PrivateNetworksscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#PrivateNetworks. []*PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork# `json:"private_networks"`
604
605 TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#TotalCount. uint32 `json:"total_count"`
606 }
607
608 // UnsafeGetTotalCount should not be used
609 // Internal usage only
610 func (r *ListPrivateNetworksResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#) UnsafeGetTotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#UnsafeGetTotalCount().() uint32 {
611 return r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#TotalCount.
612 }
613
614 // UnsafeAppend should not be used
615 // Internal usage only
616 func (r *ListPrivateNetworksResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#) UnsafeAppendscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#UnsafeAppend().(res interface{}) (uint32, error) {
617 results, ok := res.(*ListPrivateNetworksResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#)
618 if !ok {
619 return 0, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("%T type cannot be appended to type %T", res, r)
620 }
621
622 r.PrivateNetworksscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#PrivateNetworks. = append(r.PrivateNetworksscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#PrivateNetworks., results.PrivateNetworksscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#PrivateNetworks....)
623 r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#TotalCount. += uint32(len(results.PrivateNetworksscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#PrivateNetworks.))
624 return uint32(len(results.PrivateNetworksscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#PrivateNetworks.)), nil
625 }
626
627 // ListRoutesWithNexthopResponse: list routes with nexthop response.
628 type ListRoutesWithNexthopResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse# struct {
629 // Routes: list of routes.
630 Routesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#Routes. []*RouteWithNexthopscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthop# `json:"routes"`
631
632 // TotalCount: total number of routes.
633 TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#TotalCount. uint64 `json:"total_count"`
634 }
635
636 // UnsafeGetTotalCount should not be used
637 // Internal usage only
638 func (r *ListRoutesWithNexthopResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#) UnsafeGetTotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#UnsafeGetTotalCount().() uint64 {
639 return r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#TotalCount.
640 }
641
642 // UnsafeAppend should not be used
643 // Internal usage only
644 func (r *ListRoutesWithNexthopResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#) UnsafeAppendscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#UnsafeAppend().(res interface{}) (uint64, error) {
645 results, ok := res.(*ListRoutesWithNexthopResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#)
646 if !ok {
647 return 0, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("%T type cannot be appended to type %T", res, r)
648 }
649
650 r.Routesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#Routes. = append(r.Routesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#Routes., results.Routesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#Routes....)
651 r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#TotalCount. += uint64(len(results.Routesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#Routes.))
652 return uint64(len(results.Routesscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#Routes.)), nil
653 }
654
655 // ListSubnetsRequest: list subnets request.
656 type ListSubnetsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest# struct {
657 // Region: region to target. If none is passed will use default region from the config.
658 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
659
660 // OrderBy: sort order of the returned subnets.
661 // Default value: created_at_asc
662 OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#OrderBy. ListSubnetsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequestOrderBy# `json:"-"`
663
664 // Page: page number to return, from the paginated results.
665 Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#Page. *int32 `json:"-"`
666
667 // PageSize: maximum number of Private Networks to return per page.
668 PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#PageSize. *uint32 `json:"-"`
669
670 // OrganizationID: organization ID to filter for. Only subnets belonging to this Organization will be returned.
671 OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#OrganizationID. *string `json:"-"`
672
673 // ProjectID: project ID to filter for. Only subnets belonging to this Project will be returned.
674 ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#ProjectID. *string `json:"-"`
675
676 // SubnetIDs: subnet IDs to filter for. Only subnets matching the specified IDs will be returned.
677 SubnetIDsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#SubnetIDs. []string `json:"-"`
678
679 // VpcID: vPC ID to filter for. Only subnets belonging to this VPC will be returned.
680 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#VpcID. *string `json:"-"`
681 }
682
683 // ListSubnetsResponse: list subnets response.
684 type ListSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse# struct {
685 Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#Subnets. []*Subnetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Subnet# `json:"subnets"`
686
687 TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#TotalCount. uint32 `json:"total_count"`
688 }
689
690 // UnsafeGetTotalCount should not be used
691 // Internal usage only
692 func (r *ListSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#) UnsafeGetTotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#UnsafeGetTotalCount().() uint32 {
693 return r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#TotalCount.
694 }
695
696 // UnsafeAppend should not be used
697 // Internal usage only
698 func (r *ListSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#) UnsafeAppendscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#UnsafeAppend().(res interface{}) (uint32, error) {
699 results, ok := res.(*ListSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#)
700 if !ok {
701 return 0, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("%T type cannot be appended to type %T", res, r)
702 }
703
704 r.Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#Subnets. = append(r.Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#Subnets., results.Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#Subnets....)
705 r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#TotalCount. += uint32(len(results.Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#Subnets.))
706 return uint32(len(results.Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#Subnets.)), nil
707 }
708
709 // ListVPCsRequest: list vp cs request.
710 type ListVPCsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest# struct {
711 // Region: region to target. If none is passed will use default region from the config.
712 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
713
714 // OrderBy: sort order of the returned VPCs.
715 // Default value: created_at_asc
716 OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#OrderBy. ListVPCsRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequestOrderBy# `json:"-"`
717
718 // Page: page number to return, from the paginated results.
719 Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Page. *int32 `json:"-"`
720
721 // PageSize: maximum number of VPCs to return per page.
722 PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#PageSize. *uint32 `json:"-"`
723
724 // Name: name to filter for. Only VPCs with names containing this string will be returned.
725 Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Name. *string `json:"-"`
726
727 // Tags: tags to filter for. Only VPCs with one more more matching tags will be returned.
728 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Tags. []string `json:"-"`
729
730 // OrganizationID: organization ID to filter for. Only VPCs belonging to this Organization will be returned.
731 OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#OrganizationID. *string `json:"-"`
732
733 // ProjectID: project ID to filter for. Only VPCs belonging to this Project will be returned.
734 ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#ProjectID. *string `json:"-"`
735
736 // IsDefault: defines whether to filter only for VPCs which are the default one for their Project.
737 IsDefaultscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#IsDefault. *bool `json:"-"`
738
739 // RoutingEnabled: defines whether to filter only for VPCs which route traffic between their Private Networks.
740 RoutingEnabledscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#RoutingEnabled. *bool `json:"-"`
741 }
742
743 // ListVPCsResponse: list vp cs response.
744 type ListVPCsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse# struct {
745 Vpcsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#Vpcs. []*VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC# `json:"vpcs"`
746
747 TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#TotalCount. uint32 `json:"total_count"`
748 }
749
750 // UnsafeGetTotalCount should not be used
751 // Internal usage only
752 func (r *ListVPCsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#) UnsafeGetTotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#UnsafeGetTotalCount().() uint32 {
753 return r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#TotalCount.
754 }
755
756 // UnsafeAppend should not be used
757 // Internal usage only
758 func (r *ListVPCsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#) UnsafeAppendscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#UnsafeAppend().(res interface{}) (uint32, error) {
759 results, ok := res.(*ListVPCsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#)
760 if !ok {
761 return 0, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("%T type cannot be appended to type %T", res, r)
762 }
763
764 r.Vpcsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#Vpcs. = append(r.Vpcsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#Vpcs., results.Vpcsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#Vpcs....)
765 r.TotalCountscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#TotalCount. += uint32(len(results.Vpcsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#Vpcs.))
766 return uint32(len(results.Vpcsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#Vpcs.)), nil
767 }
768
769 // RoutesWithNexthopAPIListRoutesWithNexthopRequest: routes with nexthop api list routes with nexthop request.
770 type RoutesWithNexthopAPIListRoutesWithNexthopRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest# struct {
771 // Region: region to target. If none is passed will use default region from the config.
772 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
773
774 // OrderBy: sort order of the returned routes.
775 // Default value: created_at_asc
776 OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#OrderBy. ListRoutesWithNexthopRequestOrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopRequestOrderBy# `json:"-"`
777
778 // Page: page number to return, from the paginated results.
779 Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Page. *int32 `json:"-"`
780
781 // PageSize: maximum number of routes to return per page.
782 PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#PageSize. *uint32 `json:"-"`
783
784 // VpcID: vPC to filter for. Only routes within this VPC will be returned.
785 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#VpcID. *string `json:"-"`
786
787 // NexthopResourceID: next hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned.
788 NexthopResourceIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#NexthopResourceID. *string `json:"-"`
789
790 // NexthopPrivateNetworkID: next hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned.
791 NexthopPrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#NexthopPrivateNetworkID. *string `json:"-"`
792
793 // NexthopResourceType: next hop resource type to filter for. Only Routes with a matching next hop resource type will be returned.
794 // Default value: unknown_type
795 NexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#NexthopResourceType. RouteWithNexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RouteWithNexthopResourceType# `json:"-"`
796
797 // Contains: only routes whose destination is contained in this subnet will be returned.
798 Containsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Contains. *scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"-"`
799
800 // Tags: tags to filter for, only routes with one or more matching tags will be returned.
801 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Tags. []string `json:"-"`
802
803 // IsIPv6: only routes with an IPv6 destination will be returned.
804 IsIPv6scip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#IsIPv6. *bool `json:"-"`
805 }
806
807 // SetSubnetsRequest: set subnets request.
808 type SetSubnetsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest# struct {
809 // Region: region to target. If none is passed will use default region from the config.
810 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
811
812 // PrivateNetworkID: private Network ID.
813 PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#PrivateNetworkID. string `json:"-"`
814
815 // Subnets: private Network subnets CIDR.
816 Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#Subnets. []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"subnets"`
817 }
818
819 // SetSubnetsResponse: set subnets response.
820 type SetSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsResponse# struct {
821 Subnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsResponse#Subnets. []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"subnets"`
822 }
823
824 // UpdatePrivateNetworkRequest: update private network request.
825 type UpdatePrivateNetworkRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest# struct {
826 // Region: region to target. If none is passed will use default region from the config.
827 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
828
829 // PrivateNetworkID: private Network ID.
830 PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#PrivateNetworkID. string `json:"-"`
831
832 // Name: name for the Private Network.
833 Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#Name. *string `json:"name,omitempty"`
834
835 // Tags: tags for the Private Network.
836 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#Tags. *[]string `json:"tags,omitempty"`
837 }
838
839 // UpdateRouteRequest: update route request.
840 type UpdateRouteRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest# struct {
841 // Region: region to target. If none is passed will use default region from the config.
842 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
843
844 // RouteID: route ID.
845 RouteIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#RouteID. string `json:"-"`
846
847 // Description: route description.
848 Descriptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#Description. *string `json:"description,omitempty"`
849
850 // Tags: tags of the Route.
851 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#Tags. *[]string `json:"tags,omitempty"`
852
853 // Destination: destination of the Route.
854 Destinationscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#Destination. *scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.IPNetscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/IPNet# `json:"destination,omitempty"`
855
856 // NexthopResourceID: ID of the nexthop resource.
857 NexthopResourceIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#NexthopResourceID. *string `json:"nexthop_resource_id,omitempty"`
858
859 // NexthopPrivateNetworkID: ID of the nexthop private network.
860 NexthopPrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#NexthopPrivateNetworkID. *string `json:"nexthop_private_network_id,omitempty"`
861 }
862
863 // UpdateVPCRequest: update vpc request.
864 type UpdateVPCRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest# struct {
865 // Region: region to target. If none is passed will use default region from the config.
866 Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#Region. scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# `json:"-"`
867
868 // VpcID: vPC ID.
869 VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#VpcID. string `json:"-"`
870
871 // Name: name for the VPC.
872 Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#Name. *string `json:"name,omitempty"`
873
874 // Tags: tags for the VPC.
875 Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#Tags. *[]string `json:"tags,omitempty"`
876 }
877
878 // This API allows you to manage your Virtual Private Clouds (VPCs) and Private Networks.
879 type APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API# struct {
880 clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client. *scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#
881 }
882
883 // NewAPI returns a API object from a Scaleway client.
884 func NewAPIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/NewAPI().(client *scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#) *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API# {
885 return &APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#{
886 clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client.: client,
887 }
888 }
889 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) Regionsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#Regions().() []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region# {
890 return []scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Region#{scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RegionFrParscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RegionFrPar., scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RegionNlAmsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RegionNlAms., scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RegionPlWawscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RegionPlWaw.}
891 }
892
893 // ListVPCs: List existing VPCs in the specified region.
894 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) ListVPCsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#ListVPCs().(req *ListVPCsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*ListVPCsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#, error) {
895 var err error
896
897 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Region. == "" {
898 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
899 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Region. = defaultRegion
900 }
901
902 defaultPageSize, exist := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultPageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultPageSize().()
903 if (req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#PageSize. == nil || *req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#PageSize. == 0) && exist {
904 req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#PageSize. = &defaultPageSize
905 }
906
907 query := urlscip-go gomod github.com/golang/go/src go1.17 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.17 `net/url`/Values#{}
908 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "order_by", req.OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#OrderBy.)
909 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page", req.Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Page.)
910 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page_size", req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#PageSize.)
911 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "name", req.Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Name.)
912 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "tags", req.Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Tags.)
913 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "organization_id", req.OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#OrganizationID.)
914 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "project_id", req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#ProjectID.)
915 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "is_default", req.IsDefaultscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#IsDefault.)
916 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "routing_enabled", req.RoutingEnabledscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#RoutingEnabled.)
917
918 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Region.) == "" {
919 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
920 }
921
922 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
923 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "GET",
924 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsRequest#Region.) + "/vpcs",
925 Queryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Query.: query,
926 }
927
928 var resp ListVPCsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListVPCsResponse#
929
930 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
931 if err != nil {
932 return nil, err
933 }
934 return &resp, nil
935 }
936
937 // CreateVPC: Create a new VPC in the specified region.
938 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) CreateVPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#CreateVPC().(req *CreateVPCRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#, error) {
939 var err error
940
941 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#Region. == "" {
942 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
943 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#Region. = defaultRegion
944 }
945
946 if req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#ProjectID. == "" {
947 defaultProjectID, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultProjectID().()
948 req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#ProjectID. = defaultProjectID
949 }
950
951 if req.Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#Name. == "" {
952 req.Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#Name. = namegeneratorscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/.GetRandomNamescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/GetRandomName().("vpc")
953 }
954
955 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#Region.) == "" {
956 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
957 }
958
959 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
960 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST",
961 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateVPCRequest#Region.) + "/vpcs",
962 }
963
964 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
965 if err != nil {
966 return nil, err
967 }
968
969 var resp VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#
970
971 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
972 if err != nil {
973 return nil, err
974 }
975 return &resp, nil
976 }
977
978 // GetVPC: Retrieve details of an existing VPC, specified by its VPC ID.
979 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) GetVPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#GetVPC().(req *GetVPCRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#, error) {
980 var err error
981
982 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest#Region. == "" {
983 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
984 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest#Region. = defaultRegion
985 }
986
987 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest#Region.) == "" {
988 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
989 }
990
991 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest#VpcID.) == "" {
992 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field VpcID cannot be empty in request")
993 }
994
995 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
996 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "GET",
997 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest#Region.) + "/vpcs/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetVPCRequest#VpcID.) + "",
998 }
999
1000 var resp VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#
1001
1002 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1003 if err != nil {
1004 return nil, err
1005 }
1006 return &resp, nil
1007 }
1008
1009 // UpdateVPC: Update parameters including name and tags of the specified VPC.
1010 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) UpdateVPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#UpdateVPC().(req *UpdateVPCRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#, error) {
1011 var err error
1012
1013 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#Region. == "" {
1014 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1015 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#Region. = defaultRegion
1016 }
1017
1018 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#Region.) == "" {
1019 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1020 }
1021
1022 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#VpcID.) == "" {
1023 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field VpcID cannot be empty in request")
1024 }
1025
1026 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1027 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "PATCH",
1028 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#Region.) + "/vpcs/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateVPCRequest#VpcID.) + "",
1029 }
1030
1031 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1032 if err != nil {
1033 return nil, err
1034 }
1035
1036 var resp VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#
1037
1038 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1039 if err != nil {
1040 return nil, err
1041 }
1042 return &resp, nil
1043 }
1044
1045 // DeleteVPC: Delete a VPC specified by its VPC ID.
1046 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) DeleteVPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#DeleteVPC().(req *DeleteVPCRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) error {
1047 var err error
1048
1049 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest#Region. == "" {
1050 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1051 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest#Region. = defaultRegion
1052 }
1053
1054 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest#Region.) == "" {
1055 return errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1056 }
1057
1058 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest#VpcID.) == "" {
1059 return errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field VpcID cannot be empty in request")
1060 }
1061
1062 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1063 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "DELETE",
1064 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest#Region.) + "/vpcs/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteVPCRequest#VpcID.) + "",
1065 }
1066
1067 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, nil, opts...)
1068 if err != nil {
1069 return err
1070 }
1071 return nil
1072 }
1073
1074 // ListPrivateNetworks: List existing Private Networks in the specified region. By default, the Private Networks returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
1075 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) ListPrivateNetworksscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#ListPrivateNetworks().(req *ListPrivateNetworksRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*ListPrivateNetworksResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#, error) {
1076 var err error
1077
1078 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Region. == "" {
1079 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1080 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Region. = defaultRegion
1081 }
1082
1083 defaultPageSize, exist := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultPageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultPageSize().()
1084 if (req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#PageSize. == nil || *req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#PageSize. == 0) && exist {
1085 req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#PageSize. = &defaultPageSize
1086 }
1087
1088 query := urlscip-go gomod github.com/golang/go/src go1.17 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.17 `net/url`/Values#{}
1089 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "order_by", req.OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#OrderBy.)
1090 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page", req.Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Page.)
1091 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page_size", req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#PageSize.)
1092 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "name", req.Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Name.)
1093 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "tags", req.Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Tags.)
1094 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "organization_id", req.OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#OrganizationID.)
1095 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "project_id", req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#ProjectID.)
1096 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "private_network_ids", req.PrivateNetworkIDsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#PrivateNetworkIDs.)
1097 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "vpc_id", req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#VpcID.)
1098 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "dhcp_enabled", req.DHCPEnabledscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#DHCPEnabled.)
1099
1100 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Region.) == "" {
1101 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1102 }
1103
1104 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1105 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "GET",
1106 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksRequest#Region.) + "/private-networks",
1107 Queryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Query.: query,
1108 }
1109
1110 var resp ListPrivateNetworksResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListPrivateNetworksResponse#
1111
1112 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1113 if err != nil {
1114 return nil, err
1115 }
1116 return &resp, nil
1117 }
1118
1119 // CreatePrivateNetwork: Create a new Private Network. Once created, you can attach Scaleway resources which are in the same region.
1120 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) CreatePrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#CreatePrivateNetwork().(req *CreatePrivateNetworkRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#, error) {
1121 var err error
1122
1123 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Region. == "" {
1124 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1125 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Region. = defaultRegion
1126 }
1127
1128 if req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#ProjectID. == "" {
1129 defaultProjectID, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultProjectID().()
1130 req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#ProjectID. = defaultProjectID
1131 }
1132
1133 if req.Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Name. == "" {
1134 req.Namescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Name. = namegeneratorscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/.GetRandomNamescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/namegenerator`/GetRandomName().("pn")
1135 }
1136
1137 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Region.) == "" {
1138 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1139 }
1140
1141 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1142 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST",
1143 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreatePrivateNetworkRequest#Region.) + "/private-networks",
1144 }
1145
1146 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1147 if err != nil {
1148 return nil, err
1149 }
1150
1151 var resp PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#
1152
1153 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1154 if err != nil {
1155 return nil, err
1156 }
1157 return &resp, nil
1158 }
1159
1160 // GetPrivateNetwork: Retrieve information about an existing Private Network, specified by its Private Network ID. Its full details are returned in the response object.
1161 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) GetPrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#GetPrivateNetwork().(req *GetPrivateNetworkRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#, error) {
1162 var err error
1163
1164 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest#Region. == "" {
1165 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1166 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest#Region. = defaultRegion
1167 }
1168
1169 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest#Region.) == "" {
1170 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1171 }
1172
1173 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest#PrivateNetworkID.) == "" {
1174 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field PrivateNetworkID cannot be empty in request")
1175 }
1176
1177 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1178 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "GET",
1179 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest#Region.) + "/private-networks/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetPrivateNetworkRequest#PrivateNetworkID.) + "",
1180 }
1181
1182 var resp PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#
1183
1184 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1185 if err != nil {
1186 return nil, err
1187 }
1188 return &resp, nil
1189 }
1190
1191 // UpdatePrivateNetwork: Update parameters (such as name or tags) of an existing Private Network, specified by its Private Network ID.
1192 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) UpdatePrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#UpdatePrivateNetwork().(req *UpdatePrivateNetworkRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#, error) {
1193 var err error
1194
1195 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#Region. == "" {
1196 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1197 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#Region. = defaultRegion
1198 }
1199
1200 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#Region.) == "" {
1201 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1202 }
1203
1204 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#PrivateNetworkID.) == "" {
1205 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field PrivateNetworkID cannot be empty in request")
1206 }
1207
1208 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1209 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "PATCH",
1210 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#Region.) + "/private-networks/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdatePrivateNetworkRequest#PrivateNetworkID.) + "",
1211 }
1212
1213 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1214 if err != nil {
1215 return nil, err
1216 }
1217
1218 var resp PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#
1219
1220 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1221 if err != nil {
1222 return nil, err
1223 }
1224 return &resp, nil
1225 }
1226
1227 // DeletePrivateNetwork: Delete an existing Private Network. Note that you must first detach all resources from the network, in order to delete it.
1228 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) DeletePrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#DeletePrivateNetwork().(req *DeletePrivateNetworkRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) error {
1229 var err error
1230
1231 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest#Region. == "" {
1232 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1233 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest#Region. = defaultRegion
1234 }
1235
1236 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest#Region.) == "" {
1237 return errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1238 }
1239
1240 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest#PrivateNetworkID.) == "" {
1241 return errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field PrivateNetworkID cannot be empty in request")
1242 }
1243
1244 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1245 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "DELETE",
1246 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest#Region.) + "/private-networks/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeletePrivateNetworkRequest#PrivateNetworkID.) + "",
1247 }
1248
1249 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, nil, opts...)
1250 if err != nil {
1251 return err
1252 }
1253 return nil
1254 }
1255
1256 // EnableDHCP: Enable DHCP managed on an existing Private Network. Note that you will not be able to deactivate it afterwards.
1257 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) EnableDHCPscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#EnableDHCP().(req *EnableDHCPRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#, error) {
1258 var err error
1259
1260 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest#Region. == "" {
1261 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1262 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest#Region. = defaultRegion
1263 }
1264
1265 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest#Region.) == "" {
1266 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1267 }
1268
1269 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest#PrivateNetworkID.) == "" {
1270 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field PrivateNetworkID cannot be empty in request")
1271 }
1272
1273 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1274 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST",
1275 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest#Region.) + "/private-networks/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableDHCPRequest#PrivateNetworkID.) + "/enable-dhcp",
1276 }
1277
1278 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1279 if err != nil {
1280 return nil, err
1281 }
1282
1283 var resp PrivateNetworkscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/PrivateNetwork#
1284
1285 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1286 if err != nil {
1287 return nil, err
1288 }
1289 return &resp, nil
1290 }
1291
1292 // EnableRouting: Enable routing on an existing VPC. Note that you will not be able to deactivate it afterwards.
1293 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) EnableRoutingscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#EnableRouting().(req *EnableRoutingRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#, error) {
1294 var err error
1295
1296 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest#Region. == "" {
1297 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1298 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest#Region. = defaultRegion
1299 }
1300
1301 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest#Region.) == "" {
1302 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1303 }
1304
1305 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest#VpcID.) == "" {
1306 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field VpcID cannot be empty in request")
1307 }
1308
1309 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1310 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST",
1311 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest#Region.) + "/vpcs/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/EnableRoutingRequest#VpcID.) + "/enable-routing",
1312 }
1313
1314 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1315 if err != nil {
1316 return nil, err
1317 }
1318
1319 var resp VPCscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/VPC#
1320
1321 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1322 if err != nil {
1323 return nil, err
1324 }
1325 return &resp, nil
1326 }
1327
1328 // ListSubnets: List any Private Network's subnets. See ListPrivateNetworks to list a specific Private Network's subnets.
1329 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) ListSubnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#ListSubnets().(req *ListSubnetsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*ListSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#, error) {
1330 var err error
1331
1332 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#Region. == "" {
1333 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1334 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#Region. = defaultRegion
1335 }
1336
1337 defaultPageSize, exist := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultPageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultPageSize().()
1338 if (req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#PageSize. == nil || *req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#PageSize. == 0) && exist {
1339 req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#PageSize. = &defaultPageSize
1340 }
1341
1342 query := urlscip-go gomod github.com/golang/go/src go1.17 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.17 `net/url`/Values#{}
1343 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "order_by", req.OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#OrderBy.)
1344 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page", req.Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#Page.)
1345 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page_size", req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#PageSize.)
1346 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "organization_id", req.OrganizationIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#OrganizationID.)
1347 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "project_id", req.ProjectIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#ProjectID.)
1348 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "subnet_ids", req.SubnetIDsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#SubnetIDs.)
1349 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "vpc_id", req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#VpcID.)
1350
1351 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#Region.) == "" {
1352 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1353 }
1354
1355 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1356 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "GET",
1357 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsRequest#Region.) + "/subnets",
1358 Queryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Query.: query,
1359 }
1360
1361 var resp ListSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListSubnetsResponse#
1362
1363 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1364 if err != nil {
1365 return nil, err
1366 }
1367 return &resp, nil
1368 }
1369
1370 // SetSubnets: Set subnets for an existing Private Network. Note that the method is PUT and not PATCH. Any existing subnets will be removed in favor of the new specified set of subnets.
1371 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) SetSubnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#SetSubnets().(req *SetSubnetsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*SetSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsResponse#, error) {
1372 var err error
1373
1374 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#Region. == "" {
1375 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1376 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#Region. = defaultRegion
1377 }
1378
1379 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#Region.) == "" {
1380 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1381 }
1382
1383 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#PrivateNetworkID.) == "" {
1384 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field PrivateNetworkID cannot be empty in request")
1385 }
1386
1387 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1388 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "PUT",
1389 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#Region.) + "/private-networks/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsRequest#PrivateNetworkID.) + "/subnets",
1390 }
1391
1392 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1393 if err != nil {
1394 return nil, err
1395 }
1396
1397 var resp SetSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/SetSubnetsResponse#
1398
1399 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1400 if err != nil {
1401 return nil, err
1402 }
1403 return &resp, nil
1404 }
1405
1406 // AddSubnets: Add new subnets to an existing Private Network.
1407 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) AddSubnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#AddSubnets().(req *AddSubnetsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*AddSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsResponse#, error) {
1408 var err error
1409
1410 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#Region. == "" {
1411 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1412 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#Region. = defaultRegion
1413 }
1414
1415 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#Region.) == "" {
1416 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1417 }
1418
1419 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#PrivateNetworkID.) == "" {
1420 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field PrivateNetworkID cannot be empty in request")
1421 }
1422
1423 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1424 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST",
1425 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#Region.) + "/private-networks/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsRequest#PrivateNetworkID.) + "/subnets",
1426 }
1427
1428 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1429 if err != nil {
1430 return nil, err
1431 }
1432
1433 var resp AddSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/AddSubnetsResponse#
1434
1435 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1436 if err != nil {
1437 return nil, err
1438 }
1439 return &resp, nil
1440 }
1441
1442 // DeleteSubnets: Delete the specified subnets from a Private Network.
1443 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) DeleteSubnetsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#DeleteSubnets().(req *DeleteSubnetsRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*DeleteSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsResponse#, error) {
1444 var err error
1445
1446 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#Region. == "" {
1447 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1448 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#Region. = defaultRegion
1449 }
1450
1451 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#Region.) == "" {
1452 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1453 }
1454
1455 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#PrivateNetworkID.) == "" {
1456 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field PrivateNetworkID cannot be empty in request")
1457 }
1458
1459 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1460 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "DELETE",
1461 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#Region.) + "/private-networks/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.PrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsRequest#PrivateNetworkID.) + "/subnets",
1462 }
1463
1464 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1465 if err != nil {
1466 return nil, err
1467 }
1468
1469 var resp DeleteSubnetsResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteSubnetsResponse#
1470
1471 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1472 if err != nil {
1473 return nil, err
1474 }
1475 return &resp, nil
1476 }
1477
1478 // CreateRoute: Create a new custom Route.
1479 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) CreateRoutescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#CreateRoute().(req *CreateRouteRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*Routescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#, error) {
1480 var err error
1481
1482 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#Region. == "" {
1483 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1484 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#Region. = defaultRegion
1485 }
1486
1487 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#Region.) == "" {
1488 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1489 }
1490
1491 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1492 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "POST",
1493 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/CreateRouteRequest#Region.) + "/routes",
1494 }
1495
1496 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1497 if err != nil {
1498 return nil, err
1499 }
1500
1501 var resp Routescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#
1502
1503 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1504 if err != nil {
1505 return nil, err
1506 }
1507 return &resp, nil
1508 }
1509
1510 // GetRoute: Retrieve details of an existing Route, specified by its Route ID.
1511 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) GetRoutescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#GetRoute().(req *GetRouteRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*Routescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#, error) {
1512 var err error
1513
1514 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest#Region. == "" {
1515 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1516 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest#Region. = defaultRegion
1517 }
1518
1519 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest#Region.) == "" {
1520 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1521 }
1522
1523 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.RouteIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest#RouteID.) == "" {
1524 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field RouteID cannot be empty in request")
1525 }
1526
1527 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1528 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "GET",
1529 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest#Region.) + "/routes/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.RouteIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/GetRouteRequest#RouteID.) + "",
1530 }
1531
1532 var resp Routescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#
1533
1534 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1535 if err != nil {
1536 return nil, err
1537 }
1538 return &resp, nil
1539 }
1540
1541 // UpdateRoute: Update parameters of the specified Route.
1542 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) UpdateRoutescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#UpdateRoute().(req *UpdateRouteRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*Routescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#, error) {
1543 var err error
1544
1545 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#Region. == "" {
1546 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1547 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#Region. = defaultRegion
1548 }
1549
1550 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#Region.) == "" {
1551 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1552 }
1553
1554 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.RouteIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#RouteID.) == "" {
1555 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field RouteID cannot be empty in request")
1556 }
1557
1558 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1559 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "PATCH",
1560 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#Region.) + "/routes/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.RouteIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/UpdateRouteRequest#RouteID.) + "",
1561 }
1562
1563 err = scwReq.SetBodyscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#SetBody().(req)
1564 if err != nil {
1565 return nil, err
1566 }
1567
1568 var resp Routescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/Route#
1569
1570 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1571 if err != nil {
1572 return nil, err
1573 }
1574 return &resp, nil
1575 }
1576
1577 // DeleteRoute: Delete a Route specified by its Route ID.
1578 func (s *APIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#) DeleteRoutescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#DeleteRoute().(req *DeleteRouteRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) error {
1579 var err error
1580
1581 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest#Region. == "" {
1582 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1583 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest#Region. = defaultRegion
1584 }
1585
1586 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest#Region.) == "" {
1587 return errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1588 }
1589
1590 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.RouteIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest#RouteID.) == "" {
1591 return errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field RouteID cannot be empty in request")
1592 }
1593
1594 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1595 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "DELETE",
1596 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest#Region.) + "/routes/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.RouteIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/DeleteRouteRequest#RouteID.) + "",
1597 }
1598
1599 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/API#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, nil, opts...)
1600 if err != nil {
1601 return err
1602 }
1603 return nil
1604 }
1605
1606 type RoutesWithNexthopAPIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI# struct {
1607 clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI#client. *scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#
1608 }
1609
1610 // NewRoutesWithNexthopAPI returns a RoutesWithNexthopAPI object from a Scaleway client.
1611 func NewRoutesWithNexthopAPIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/NewRoutesWithNexthopAPI().(client *scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.Clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#) *RoutesWithNexthopAPIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI# {
1612 return &RoutesWithNexthopAPIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI#{
1613 clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI#client.: client,
1614 }
1615 }
1616
1617 // ListRoutesWithNexthop: Return routes with associated next hop data.
1618 func (s *RoutesWithNexthopAPIscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI#) ListRoutesWithNexthopscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI#ListRoutesWithNexthop().(req *RoutesWithNexthopAPIListRoutesWithNexthopRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#, opts ...scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.RequestOptionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/RequestOption#) (*ListRoutesWithNexthopResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#, error) {
1619 var err error
1620
1621 if req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Region. == "" {
1622 defaultRegion, _ := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI#client..GetDefaultRegionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultRegion().()
1623 req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Region. = defaultRegion
1624 }
1625
1626 defaultPageSize, exist := s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI#client..GetDefaultPageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#GetDefaultPageSize().()
1627 if (req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#PageSize. == nil || *req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#PageSize. == 0) && exist {
1628 req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#PageSize. = &defaultPageSize
1629 }
1630
1631 query := urlscip-go gomod github.com/golang/go/src go1.17 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.17 `net/url`/Values#{}
1632 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "order_by", req.OrderByscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#OrderBy.)
1633 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page", req.Pagescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Page.)
1634 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "page_size", req.PageSizescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#PageSize.)
1635 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "vpc_id", req.VpcIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#VpcID.)
1636 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "nexthop_resource_id", req.NexthopResourceIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#NexthopResourceID.)
1637 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "nexthop_private_network_id", req.NexthopPrivateNetworkIDscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#NexthopPrivateNetworkID.)
1638 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "nexthop_resource_type", req.NexthopResourceTypescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#NexthopResourceType.)
1639 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "contains", req.Containsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Contains.)
1640 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "tags", req.Tagsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Tags.)
1641 parameterscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/.AddToQueryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/parameter`/AddToQuery().(query, "is_ipv6", req.IsIPv6scip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#IsIPv6.)
1642
1643 if fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Region.) == "" {
1644 return nil, errorsscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/.Newscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/errors`/New().("field Region cannot be empty in request")
1645 }
1646
1647 scwReq := &scwscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/.ScalewayRequestscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#{
1648 Methodscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Method.: "GET",
1649 Pathscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Path.: "/vpc/v2/regions/" + fmtscip-go gomod github.com/golang/go/src go1.17 fmt/.Sprintscip-go gomod github.com/golang/go/src go1.17 fmt/Sprint().(req.Regionscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPIListRoutesWithNexthopRequest#Region.) + "/routes-with-nexthop",
1650 Queryscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/ScalewayRequest#Query.: query,
1651 }
1652
1653 var resp ListRoutesWithNexthopResponsescip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/ListRoutesWithNexthopResponse#
1654
1655 err = s.clientscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/api/vpc/v2`/RoutesWithNexthopAPI#client..Doscip-go gomod github.com/scaleway/scaleway-sdk-go . `github.com/scaleway/scaleway-sdk-go/scw`/Client#Do().(scwReq, &resp, opts...)
1656 if err != nil {
1657 return nil, err
1658 }
1659 return &resp, nil
1660 }