Skip to content

Commit a369f46

Browse files
committed
Generated the client-sdk using the latest spec
1 parent aa9d8dd commit a369f46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+231
-920
lines changed

client-sdk/go/client/api_cluster_record_keeping.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 VMware, Inc.
2+
Copyright 2025 VMware, Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -17,12 +17,13 @@ package swagger
1717

1818
import (
1919
"context"
20-
"github.com/antihax/optional"
2120
"io/ioutil"
2221
"net/http"
2322
"net/url"
2423
"os"
2524
"strings"
25+
26+
"github.com/antihax/optional"
2627
)
2728

2829
// Linger please

client-sdk/go/client/api_datastore_operations.go

Lines changed: 0 additions & 453 deletions
This file was deleted.

client-sdk/go/client/api_job_details.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2022 VMware, Inc.
2+
Copyright 2025 VMware, Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

client-sdk/go/client/api_orphan_snapshot.go

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
Copyright 2024 VMware, Inc.
2+
Copyright 2025 VMware, Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,6 +21,7 @@ import (
2121
"net/http"
2222
"net/url"
2323
"strings"
24+
2425
"github.com/antihax/optional"
2526
)
2627

@@ -30,6 +31,7 @@ var (
3031
)
3132

3233
type OrphanSnapshotApiService service
34+
3335
/*
3436
OrphanSnapshotApiService Delete orphan snapshots.
3537
Use this API to identify and delete orphan snapshots. From vSphere CSI plugin's perspective, orphan snapshots are FCD snapshots that were initiated through the vSphere CSI driver but do not have a corresponding VolumeSnapshotContent object in the Kubernetes cluster. snapshotPrefix is the prefix used in the snapshot description. Its default value is “snapshot”, which is also the default value used by snapshot sidecar in CSI and it can be configured based on prefix used in the snapshot sidecar. Use the `snapshotPrefix` parameter to specify alternate prefix. From Velero vSphere plugin's perspective, orphan snapshots are snapshots whose upload is failing with multiple attempts or snapshots whose local deletion is failing after successful upload. For Velero vSphere plugin, user has to specify “AstrolabeSnapshot” as the snapshotPrefix. Orphan snapshot deletion operation is performed asynchronously. It returns a job id, the status of which can be retrieved using `jobStatus` API.
@@ -42,17 +44,17 @@ Use this API to identify and delete orphan snapshots. From vSphere CSI plugin&#x
4244
*/
4345

4446
type OrphanSnapshotApiOrphanSnapshotsDeleteOpts struct {
45-
Datacenter optional.String
46-
Datastores optional.String
47-
SnapshotPrefix optional.String
47+
Datacenter optional.String
48+
Datastores optional.String
49+
SnapshotPrefix optional.String
4850
}
4951

5052
func (a *OrphanSnapshotApiService) OrphanSnapshotsDelete(ctx context.Context, localVarOptionals *OrphanSnapshotApiOrphanSnapshotsDeleteOpts) (SnapshotDeleteResult, *http.Response, error) {
5153
var (
52-
localVarHttpMethod = strings.ToUpper("Delete")
53-
localVarPostBody interface{}
54-
localVarFileName string
55-
localVarFileBytes []byte
54+
localVarHttpMethod = strings.ToUpper("Delete")
55+
localVarPostBody interface{}
56+
localVarFileName string
57+
localVarFileBytes []byte
5658
localVarReturnValue SnapshotDeleteResult
5759
)
5860

@@ -107,42 +109,43 @@ func (a *OrphanSnapshotApiService) OrphanSnapshotsDelete(ctx context.Context, lo
107109

108110
if localVarHttpResponse.StatusCode < 300 {
109111
// If we succeed, return the data, otherwise pass on to decode error.
110-
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
111-
if err == nil {
112+
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
113+
if err == nil {
112114
return localVarReturnValue, localVarHttpResponse, err
113115
}
114116
}
115117

116118
if localVarHttpResponse.StatusCode >= 300 {
117119
newErr := GenericSwaggerError{
118-
body: localVarBody,
120+
body: localVarBody,
119121
error: localVarHttpResponse.Status,
120122
}
121123
if localVarHttpResponse.StatusCode == 202 {
122124
var v SnapshotDeleteResult
123-
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
124-
if err != nil {
125-
newErr.error = err.Error()
126-
return localVarReturnValue, localVarHttpResponse, newErr
127-
}
128-
newErr.model = v
125+
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
126+
if err != nil {
127+
newErr.error = err.Error()
129128
return localVarReturnValue, localVarHttpResponse, newErr
129+
}
130+
newErr.model = v
131+
return localVarReturnValue, localVarHttpResponse, newErr
130132
}
131133
if localVarHttpResponse.StatusCode == 0 {
132134
var v ModelError
133-
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
134-
if err != nil {
135-
newErr.error = err.Error()
136-
return localVarReturnValue, localVarHttpResponse, newErr
137-
}
138-
newErr.model = v
135+
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
136+
if err != nil {
137+
newErr.error = err.Error()
139138
return localVarReturnValue, localVarHttpResponse, newErr
139+
}
140+
newErr.model = v
141+
return localVarReturnValue, localVarHttpResponse, newErr
140142
}
141143
return localVarReturnValue, localVarHttpResponse, newErr
142144
}
143145

144146
return localVarReturnValue, localVarHttpResponse, nil
145147
}
148+
146149
/*
147150
OrphanSnapshotApiService List all the orphan snapshots.
148151
Use this API to identify orphan snapshots. From vSphere CSI plugin&#x27;s perspective, orphan snapshots are FCD snapshots that were initiated through the vSphere CSI driver but do not have a corresponding VolumeSnapshotContent object in the Kubernetes cluster. snapshotPrefix is the prefix used in the snapshot description. Its default value is “snapshot”, which is also the default value used by snapshot sidecar in CSI and it can be configured based on prefix used in the snapshot sidecar. Use the &#x60;snapshotPrefix&#x60; parameter to specify alternate prefix. From Velero vSphere plugin&#x27;s perspective, orphan snapshots are snapshots whose upload is failing with multiple attempts or snapshots whose local deletion is failing after successful upload. For Velero vSphere plugin, user has to specify “AstrolabeSnapshot” as the snapshotPrefix. GET API for orphan snapshots support pagination. The response body contains totalOrphanSnapshots, limit and offset values. Also, response header contains X-Limit and X-Next-Offset values. Based on these values user can decide if there are more results to be fetched. Since the detection of orphan snapshots is an expensive operation, the operation is performed asynchronously at regular intervals. This API returns the list of orphan snapshots found in the last run of the operation. &#x60;retryAfterMinutes&#x60; in response body indicates the time in minutes after which the next retry should be attempted to get the updated orphan snapshot list.
@@ -157,19 +160,19 @@ Use this API to identify orphan snapshots. From vSphere CSI plugin&#x27;s perspe
157160
*/
158161

159162
type OrphanSnapshotApiOrphanSnapshotsListOpts struct {
160-
Datacenter optional.String
161-
Datastores optional.String
162-
SnapshotPrefix optional.String
163-
Limit optional.Int64
164-
Offset optional.Int64
163+
Datacenter optional.String
164+
Datastores optional.String
165+
SnapshotPrefix optional.String
166+
Limit optional.Int64
167+
Offset optional.Int64
165168
}
166169

167170
func (a *OrphanSnapshotApiService) OrphanSnapshotsList(ctx context.Context, localVarOptionals *OrphanSnapshotApiOrphanSnapshotsListOpts) (OrphanSnapshotResult, *http.Response, error) {
168171
var (
169-
localVarHttpMethod = strings.ToUpper("Get")
170-
localVarPostBody interface{}
171-
localVarFileName string
172-
localVarFileBytes []byte
172+
localVarHttpMethod = strings.ToUpper("Get")
173+
localVarPostBody interface{}
174+
localVarFileName string
175+
localVarFileBytes []byte
173176
localVarReturnValue OrphanSnapshotResult
174177
)
175178

@@ -230,36 +233,36 @@ func (a *OrphanSnapshotApiService) OrphanSnapshotsList(ctx context.Context, loca
230233

231234
if localVarHttpResponse.StatusCode < 300 {
232235
// If we succeed, return the data, otherwise pass on to decode error.
233-
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
234-
if err == nil {
236+
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
237+
if err == nil {
235238
return localVarReturnValue, localVarHttpResponse, err
236239
}
237240
}
238241

239242
if localVarHttpResponse.StatusCode >= 300 {
240243
newErr := GenericSwaggerError{
241-
body: localVarBody,
244+
body: localVarBody,
242245
error: localVarHttpResponse.Status,
243246
}
244247
if localVarHttpResponse.StatusCode == 200 {
245248
var v OrphanSnapshotResult
246-
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
247-
if err != nil {
248-
newErr.error = err.Error()
249-
return localVarReturnValue, localVarHttpResponse, newErr
250-
}
251-
newErr.model = v
249+
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
250+
if err != nil {
251+
newErr.error = err.Error()
252252
return localVarReturnValue, localVarHttpResponse, newErr
253+
}
254+
newErr.model = v
255+
return localVarReturnValue, localVarHttpResponse, newErr
253256
}
254257
if localVarHttpResponse.StatusCode == 0 {
255258
var v ModelError
256-
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
257-
if err != nil {
258-
newErr.error = err.Error()
259-
return localVarReturnValue, localVarHttpResponse, newErr
260-
}
261-
newErr.model = v
259+
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
260+
if err != nil {
261+
newErr.error = err.Error()
262262
return localVarReturnValue, localVarHttpResponse, newErr
263+
}
264+
newErr.model = v
265+
return localVarReturnValue, localVarHttpResponse, newErr
263266
}
264267
return localVarReturnValue, localVarHttpResponse, newErr
265268
}

client-sdk/go/client/api_orphan_volume.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 VMware, Inc.
2+
Copyright 2025 VMware, Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -17,11 +17,12 @@ package swagger
1717

1818
import (
1919
"context"
20-
"github.com/antihax/optional"
2120
"io/ioutil"
2221
"net/http"
2322
"net/url"
2423
"strings"
24+
25+
"github.com/antihax/optional"
2526
)
2627

2728
// Linger please

0 commit comments

Comments
 (0)