// <auto-generated>
// Code generated by gen/KubernetesWatchGenerator
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
using k8s.Models;
using System; 
using System.Collections.Generic; 
using System.Threading; 
using System.Threading.Tasks; 

namespace k8s
{
    public partial class Kubernetes
    {
        {{#.}}
        /// <inheritdoc/>
        public Task<Watcher<{{GetClassName operation}}>> {{GetMethodName operation}}(
{{#operation.actualParameters}}
{{#isRequired}}
            {{GetDotNetType type name isRequired}} {{GetDotNetName name}},
{{/isRequired}}
{{/operation.actualParameters}}
{{#operation.actualParameters}}
{{^isRequired}}
            {{GetDotNetType .}} {{GetDotNetName .}} = null,
{{/isRequired}}
{{/operation.actualParameters}}
            Dictionary<string, List<string>> customHeaders = null,
            Action<WatchEventType, {{GetClassName operation}}> onEvent = null,
            Action<Exception> onError = null,
            Action onClosed = null,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            string path = $"{{GetPathExpression .}}";
            return WatchObjectAsync<{{GetClassName operation}}>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
        }

        {{/.}}
    }
}
