Skip to content

Commit fb8ef4f

Browse files
committed
Add modify generic commands
1 parent d2f1cd4 commit fb8ef4f

File tree

2 files changed

+1013
-47
lines changed

2 files changed

+1013
-47
lines changed

src/KubernetesClient/IKubernetes.Generic.cs

Lines changed: 263 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,270 @@ public partial interface IKubernetes
107107
/// The cancellation token.
108108
/// </param>
109109
Task<HttpOperationResponse<KubernetesList<T>>> ListWithHttpMessagesAsync<T>(
110-
string namespaceParameter = default(string),
111-
bool? allowWatchBookmarks = default(bool?),
112-
string continueParameter = default(string),
113-
string fieldSelector = default(string),
114-
string labelSelector = default(string),
115-
int? limit = default(int?),
116-
string resourceVersion = default(string),
117-
int? timeoutSeconds = default(int?),
118-
bool? watch = default(bool?),
119-
string pretty = default(string),
110+
string namespaceParameter = default,
111+
bool? allowWatchBookmarks = default,
112+
string continueParameter = default,
113+
string fieldSelector = default,
114+
string labelSelector = default,
115+
int? limit = default,
116+
string resourceVersion = default,
117+
int? timeoutSeconds = default,
118+
bool? watch = default,
119+
string pretty = default,
120120
Dictionary<string, List<string>> customHeaders = null,
121-
CancellationToken cancellationToken = default(CancellationToken)) where T : IKubernetesObject;
121+
CancellationToken cancellationToken = default) where T : IKubernetesObject;
122+
123+
124+
/// <summary>
125+
/// read the specified Kubernetes Object
126+
/// </summary>
127+
/// <param name='name'>
128+
/// name of the Kubernetes Object
129+
/// </param>
130+
/// <param name='namespaceParameter'>
131+
/// object name and auth scope, such as for teams and projects
132+
/// </param>
133+
/// <param name='exact'>
134+
/// Should the export be exact. Exact export maintains cluster-specific fields
135+
/// like 'Namespace'. Deprecated. Planned for removal in 1.18.
136+
/// </param>
137+
/// <param name='export'>
138+
/// Should this value be exported. Export strips fields that a user can not
139+
/// specify. Deprecated. Planned for removal in 1.18.
140+
/// </param>
141+
/// <param name='pretty'>
142+
/// If 'true', then the output is pretty printed.
143+
/// </param>
144+
/// <param name='customHeaders'>
145+
/// Headers that will be added to request.
146+
/// </param>
147+
/// <param name='cancellationToken'>
148+
/// The cancellation token.
149+
/// </param>
150+
/// <exception cref="HttpOperationException">
151+
/// Thrown when the operation returned an invalid status code
152+
/// </exception>
153+
/// <exception cref="SerializationException">
154+
/// Thrown when unable to deserialize the response
155+
/// </exception>
156+
/// <exception cref="ValidationException">
157+
/// Thrown when a required parameter is null
158+
/// </exception>
159+
/// <exception cref="System.ArgumentNullException">
160+
/// Thrown when a required parameter is null
161+
/// </exception>
162+
/// <return>
163+
/// A response object containing the response body and response headers.
164+
/// </return>
165+
Task<HttpOperationResponse<T>> ReadWithHttpMessagesAsync<T>(
166+
string name,
167+
string namespaceParameter = null,
168+
bool? exact = default,
169+
bool? export = default,
170+
string pretty = default,
171+
Dictionary<string, List<string>> customHeaders = null,
172+
CancellationToken cancellationToken = default) where T : IKubernetesObject;
173+
174+
/// <summary>
175+
/// create a Kubernetes Object
176+
/// </summary>
177+
/// <param name='body'>
178+
/// </param>
179+
/// <param name='namespaceParameter'>
180+
/// object name and auth scope, such as for teams and projects
181+
/// </param>
182+
/// <param name='dryRun'>
183+
/// When present, indicates that modifications should not be persisted. An
184+
/// invalid or unrecognized dryRun directive will result in an error response
185+
/// and no further processing of the request. Valid values are: - All: all dry
186+
/// run stages will be processed
187+
/// </param>
188+
/// <param name='fieldManager'>
189+
/// fieldManager is a name associated with the actor or entity that is making
190+
/// these changes. The value must be less than or 128 characters long, and only
191+
/// contain printable characters, as defined by
192+
/// https://golang.org/pkg/unicode/#IsPrint.
193+
/// </param>
194+
/// <param name='pretty'>
195+
/// If 'true', then the output is pretty printed.
196+
/// </param>
197+
/// <param name='customHeaders'>
198+
/// Headers that will be added to request.
199+
/// </param>
200+
/// <param name='cancellationToken'>
201+
/// The cancellation token.
202+
/// </param>
203+
/// <exception cref="HttpOperationException">
204+
/// Thrown when the operation returned an invalid status code
205+
/// </exception>
206+
/// <exception cref="SerializationException">
207+
/// Thrown when unable to deserialize the response
208+
/// </exception>
209+
/// <exception cref="ValidationException">
210+
/// Thrown when a required parameter is null
211+
/// </exception>
212+
/// <exception cref="System.ArgumentNullException">
213+
/// Thrown when a required parameter is null
214+
/// </exception>
215+
/// <return>
216+
/// A response object containing the response body and response headers.
217+
/// </return>
218+
Task<HttpOperationResponse<T>> CreateWithHttpMessagesAsync<T>(
219+
T body,
220+
string namespaceParameter,
221+
string dryRun = default,
222+
string fieldManager = default,
223+
string pretty = default,
224+
Dictionary<string, List<string>> customHeaders = null,
225+
CancellationToken cancellationToken = default) where T : IKubernetesObject;
226+
227+
/// <summary>
228+
/// delete a Kubernetes Object
229+
/// </summary>
230+
/// <param name='name'>
231+
/// name of the Kubernetes Object
232+
/// </param>
233+
/// <param name='namespaceParameter'>
234+
/// object name and auth scope, such as for teams and projects
235+
/// </param>
236+
/// <param name='body'>
237+
/// </param>
238+
/// <param name='dryRun'>
239+
/// When present, indicates that modifications should not be persisted. An
240+
/// invalid or unrecognized dryRun directive will result in an error response
241+
/// and no further processing of the request. Valid values are: - All: all dry
242+
/// run stages will be processed
243+
/// </param>
244+
/// <param name='gracePeriodSeconds'>
245+
/// The duration in seconds before the object should be deleted. Value must be
246+
/// non-negative integer. The value zero indicates delete immediately. If this
247+
/// value is nil, the default grace period for the specified type will be used.
248+
/// Defaults to a per object value if not specified. zero means delete
249+
/// immediately.
250+
/// </param>
251+
/// <param name='orphanDependents'>
252+
/// Deprecated: please use the PropagationPolicy, this field will be deprecated
253+
/// in 1.7. Should the dependent objects be orphaned. If true/false, the
254+
/// "orphan" finalizer will be added to/removed from the object's finalizers
255+
/// list. Either this field or PropagationPolicy may be set, but not both.
256+
/// </param>
257+
/// <param name='propagationPolicy'>
258+
/// Whether and how garbage collection will be performed. Either this field or
259+
/// OrphanDependents may be set, but not both. The default policy is decided by
260+
/// the existing finalizer set in the metadata.finalizers and the
261+
/// resource-specific default policy. Acceptable values are: 'Orphan' - orphan
262+
/// the dependents; 'Background' - allow the garbage collector to delete the
263+
/// dependents in the background; 'Foreground' - a cascading policy that
264+
/// deletes all dependents in the foreground.
265+
/// </param>
266+
/// <param name='pretty'>
267+
/// If 'true', then the output is pretty printed.
268+
/// </param>
269+
/// <param name='customHeaders'>
270+
/// Headers that will be added to request.
271+
/// </param>
272+
/// <param name='cancellationToken'>
273+
/// The cancellation token.
274+
/// </param>
275+
/// <exception cref="HttpOperationException">
276+
/// Thrown when the operation returned an invalid status code
277+
/// </exception>
278+
/// <exception cref="SerializationException">
279+
/// Thrown when unable to deserialize the response
280+
/// </exception>
281+
/// <exception cref="ValidationException">
282+
/// Thrown when a required parameter is null
283+
/// </exception>
284+
/// <exception cref="System.ArgumentNullException">
285+
/// Thrown when a required parameter is null
286+
/// </exception>
287+
/// <return>
288+
/// A response object containing the response body and response headers.
289+
/// </return>
290+
Task<HttpOperationResponse<V1Status>> DeleteWithHttpMessagesAsync<T>(
291+
string name = default,
292+
string namespaceParameter = default,
293+
bool? allowWatchBookmarks = default,
294+
V1DeleteOptions body = default,
295+
string continueParameter = default,
296+
string dryRun = default,
297+
string fieldSelector = default,
298+
int? gracePeriodSeconds = default,
299+
string labelSelector = default,
300+
int? limit = default,
301+
bool? orphanDependents = default,
302+
string propagationPolicy = default,
303+
string resourceVersion = default,
304+
int? timeoutSeconds = default,
305+
bool? watch = default,
306+
string pretty = default,
307+
Dictionary<string, List<string>> customHeaders = null,
308+
CancellationToken cancellationToken = default) where T : IKubernetesObject;
309+
310+
/// <summary>
311+
/// partially update the specified Kubernetes Object
312+
/// </summary>
313+
/// <param name='body'>
314+
/// </param>
315+
/// <param name='name'>
316+
/// name of the Kubernetes Object
317+
/// </param>
318+
/// <param name='namespaceParameter'>
319+
/// object name and auth scope, such as for teams and projects
320+
/// </param>
321+
/// <param name='dryRun'>
322+
/// When present, indicates that modifications should not be persisted. An
323+
/// invalid or unrecognized dryRun directive will result in an error response
324+
/// and no further processing of the request. Valid values are: - All: all dry
325+
/// run stages will be processed
326+
/// </param>
327+
/// <param name='fieldManager'>
328+
/// fieldManager is a name associated with the actor or entity that is making
329+
/// these changes. The value must be less than or 128 characters long, and only
330+
/// contain printable characters, as defined by
331+
/// https://golang.org/pkg/unicode/#IsPrint. This field is required for apply
332+
/// requests (application/apply-patch) but optional for non-apply patch types
333+
/// (JsonPatch, MergePatch, StrategicMergePatch).
334+
/// </param>
335+
/// <param name='force'>
336+
/// Force is going to "force" Apply requests. It means user will re-acquire
337+
/// conflicting fields owned by other people. Force flag must be unset for
338+
/// non-apply patch requests.
339+
/// </param>
340+
/// <param name='pretty'>
341+
/// If 'true', then the output is pretty printed.
342+
/// </param>
343+
/// <param name='customHeaders'>
344+
/// Headers that will be added to request.
345+
/// </param>
346+
/// <param name='cancellationToken'>
347+
/// The cancellation token.
348+
/// </param>
349+
/// <exception cref="HttpOperationException">
350+
/// Thrown when the operation returned an invalid status code
351+
/// </exception>
352+
/// <exception cref="SerializationException">
353+
/// Thrown when unable to deserialize the response
354+
/// </exception>
355+
/// <exception cref="ValidationException">
356+
/// Thrown when a required parameter is null
357+
/// </exception>
358+
/// <exception cref="System.ArgumentNullException">
359+
/// Thrown when a required parameter is null
360+
/// </exception>
361+
/// <return>
362+
/// A response object containing the response body and response headers.
363+
/// </return>
364+
Task<HttpOperationResponse<T>> PatchWithHttpMessagesAsync<T>(
365+
V1Patch body,
366+
string name,
367+
string namespaceParameter,
368+
string dryRun = default,
369+
string fieldManager = default,
370+
bool? force = default,
371+
string pretty = default,
372+
Dictionary<string, List<string>> customHeaders = null,
373+
CancellationToken cancellationToken = default) where T : IKubernetesObject;
122374

123375
}
124376
}

0 commit comments

Comments
 (0)