Files
csharp/gen/KubernetesWatchGenerator/IKubernetes.Watch.cs.template
Frederik Carlier bf4a7040d4 Add a common IKubernetesObject interface, expose type metadata (#152)
* - Implement common interface across all Kubernetes elements
- Add ApiVersion, Kind and Group properties

* Add IKubernetesObject interface

* Regenerate code

* Fixup after rebase

* Fixes after rebase, make method names consistent
2018-05-02 22:04:47 -07:00

63 lines
2.1 KiB
Plaintext

using k8s.Models;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace k8s
{
public partial interface IKubernetes
{
{{#.}}
/// <summary>
/// {{ToXmlDoc operation.description}}
/// </summary>
{{#operation.actualParameters}}
{{#isRequired}}
/// <param name="{{name}}">
/// {{ToXmlDoc description}}
/// </param>
{{/isRequired}}
{{/operation.actualParameters}}
{{#operation.actualParameters}}
{{^isRequired}}
/// <param name="{{name}}">
/// {{ToXmlDoc description}}
/// </param>
{{/isRequired}}
{{/operation.actualParameters}}
/// <param name="customHeaders">
/// The headers that will be added to request.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
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,
CancellationToken cancellationToken = default(CancellationToken));
{{/.}}
}
}