2021-08-09 07:27:32 -07:00
|
|
|
// <auto-generated>
|
|
|
|
|
// Code generated by https://github.com/kubernetes-client/csharp/tree/master/gen/KubernetesGenerator
|
|
|
|
|
// Changes may cause incorrect behavior and will be lost if the code is
|
|
|
|
|
// regenerated.
|
|
|
|
|
// </auto-generated>
|
|
|
|
|
|
|
|
|
|
namespace k8s
|
|
|
|
|
{
|
|
|
|
|
using Models;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extension methods for Kubernetes.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static partial class KubernetesExtensions
|
|
|
|
|
{
|
|
|
|
|
{{#.}}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// {{ToXmlDoc operation.description}}
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name='operations'>
|
|
|
|
|
/// The operations group for this extension method.
|
|
|
|
|
/// </param>
|
|
|
|
|
{{#operation.parameters}}
|
|
|
|
|
/// <param name="{{GetDotNetName .}}">
|
|
|
|
|
/// {{ToXmlDoc description}}
|
|
|
|
|
/// </param>
|
|
|
|
|
{{/operation.parameters}}
|
|
|
|
|
public static {{GetReturnType operation "void"}} {{GetMethodName operation ""}}(
|
|
|
|
|
this IKubernetes operations
|
|
|
|
|
{{#operation.parameters}}
|
|
|
|
|
,{{GetDotNetType .}} {{GetDotNetName . "true"}}
|
|
|
|
|
{{/operation.parameters}}
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
{{GetReturnType operation "return"}} operations.{{GetMethodName operation "Async"}}(
|
|
|
|
|
{{#operation.parameters}}
|
|
|
|
|
{{GetDotNetName .}},
|
|
|
|
|
{{/operation.parameters}}
|
|
|
|
|
CancellationToken.None
|
|
|
|
|
).GetAwaiter().GetResult();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// {{ToXmlDoc operation.description}}
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name='operations'>
|
|
|
|
|
/// The operations group for this extension method.
|
|
|
|
|
/// </param>
|
|
|
|
|
{{#operation.parameters}}
|
|
|
|
|
/// <param name="{{GetDotNetName .}}">
|
|
|
|
|
/// {{ToXmlDoc description}}
|
|
|
|
|
/// </param>
|
|
|
|
|
{{/operation.parameters}}
|
|
|
|
|
/// <param name="cancellationToken">
|
|
|
|
|
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
|
|
|
|
|
/// </param>
|
|
|
|
|
public static async Task{{GetReturnType operation "<>"}} {{GetMethodName operation "Async"}}(
|
|
|
|
|
this IKubernetes operations,
|
|
|
|
|
{{#operation.parameters}}
|
|
|
|
|
{{GetDotNetType .}} {{GetDotNetName . "true"}},
|
|
|
|
|
{{/operation.parameters}}
|
|
|
|
|
CancellationToken cancellationToken = default(CancellationToken))
|
|
|
|
|
{
|
2021-09-17 08:21:00 -07:00
|
|
|
{{#IfReturnType operation "stream"}}
|
|
|
|
|
var _result = await operations.{{GetMethodName operation "WithHttpMessagesAsync"}}(
|
|
|
|
|
{{#operation.parameters}}
|
|
|
|
|
{{GetDotNetName .}},
|
|
|
|
|
{{/operation.parameters}}
|
|
|
|
|
null,
|
|
|
|
|
cancellationToken);
|
|
|
|
|
_result.Request.Dispose();
|
|
|
|
|
{{GetReturnType operation "_result.Body"}};
|
|
|
|
|
{{/IfReturnType operation "stream"}}
|
|
|
|
|
{{#IfReturnType operation "obj"}}
|
2021-08-09 07:27:32 -07:00
|
|
|
using (var _result = await operations.{{GetMethodName operation "WithHttpMessagesAsync"}}(
|
|
|
|
|
{{#operation.parameters}}
|
|
|
|
|
{{GetDotNetName .}},
|
|
|
|
|
{{/operation.parameters}}
|
|
|
|
|
null,
|
|
|
|
|
cancellationToken).ConfigureAwait(false))
|
|
|
|
|
{
|
|
|
|
|
{{GetReturnType operation "_result.Body"}};
|
|
|
|
|
}
|
2021-09-17 08:21:00 -07:00
|
|
|
{{/IfReturnType operation "obj"}}
|
|
|
|
|
{{#IfReturnType operation "void"}}
|
|
|
|
|
using (var _result = await operations.{{GetMethodName operation "WithHttpMessagesAsync"}}(
|
|
|
|
|
{{#operation.parameters}}
|
|
|
|
|
{{GetDotNetName .}},
|
|
|
|
|
{{/operation.parameters}}
|
|
|
|
|
null,
|
|
|
|
|
cancellationToken).ConfigureAwait(false))
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
{{/IfReturnType operation "void"}}
|
2021-08-09 07:27:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{{/.}}
|
|
|
|
|
}
|
|
|
|
|
}
|