diff --git a/gen/KubernetesWatchGenerator/Program.cs b/gen/KubernetesWatchGenerator/Program.cs index 76c1b277b..54eec521c 100644 --- a/gen/KubernetesWatchGenerator/Program.cs +++ b/gen/KubernetesWatchGenerator/Program.cs @@ -13,34 +13,38 @@ namespace KubernetesWatchGenerator { class Program { + static readonly Dictionary ClassNameMap = new Dictionary(); + static async Task Main(string[] args) { if (args.Length < 2) { - Console.Error.WriteLine($"usage {args[0]} path/to/csharp.settings"); + Console.Error.WriteLine($"usage {args[0]} path/to/generated"); Environment.Exit(1); } - var (kubernetesBranch, outputDirectory) = LoadSettings(args[1]); - - var specUrl = $"https://raw.githubusercontent.com/kubernetes/kubernetes/{kubernetesBranch}/api/openapi-spec/swagger.json"; - var specPath = $"{kubernetesBranch}-swagger.json"; + var outputDirectory = args[1]; - // Download the Kubernetes spec, and cache it locally. Don't download it if already present in the cache. - if (!File.Exists(specPath)) + // Read the spec trimmed + // here we cache all name in gen project for later use + var swagger = await SwaggerDocument.FromFileAsync(Path.Combine(args[1], "swagger.json")); + foreach (var (k, v) in swagger.Definitions) { - HttpClient client = new HttpClient(); - using (var response = await client.GetAsync(specUrl, HttpCompletionOption.ResponseHeadersRead)) - using (var stream = await response.Content.ReadAsStreamAsync()) - using (var output = File.Open(specPath, FileMode.Create, FileAccess.ReadWrite)) + if (v.ExtensionData?.TryGetValue("x-kubernetes-group-version-kind", out var _) == true) { - await stream.CopyToAsync(output); + var groupVersionKindElements = (object[])v.ExtensionData["x-kubernetes-group-version-kind"]; + var groupVersionKind = (Dictionary)groupVersionKindElements[0]; + + var group = (string)groupVersionKind["group"]; + var kind = (string)groupVersionKind["kind"]; + var version = (string)groupVersionKind["version"]; + ClassNameMap[$"{group}_{kind}_{version}"] = ToPascalCase(k.Replace(".", "")); } } - // Read the spec - var swagger = await SwaggerDocument.FromFileAsync(specPath); + // gen project removed all watch operations, so here we switch back to unprocessed version + swagger = await SwaggerDocument.FromFileAsync(Path.Combine(args[1], "swagger.json.unprocessed")); // Register helpers used in the templating. Helpers.Register(nameof(ToXmlDoc), ToXmlDoc); @@ -58,17 +62,6 @@ static async Task Main(string[] args) // That's usually because there are different version of the same object (e.g. for deployments). var blacklistedOperations = new HashSet() { - "watchAppsV1beta1NamespacedDeployment", - "watchAppsV1beta2NamespacedDeployment", - "watchExtensionsV1beta1NamespacedDeployment", - "watchExtensionsV1beta1NamespacedNetworkPolicy", - "watchPolicyV1beta1PodSecurityPolicy", - "watchExtensionsV1beta1PodSecurityPolicy", - "watchExtensionsV1beta1NamespacedIngress", - "watchNamespacedIngress", - "watchExtensionsV1beta1NamespacedIngressList", - "watchNetworkingV1beta1NamespacedIngress", - "watchNetworkingV1beta1NamespacedIngressList", }; var watchOperations = swagger.Operations.Where( @@ -83,16 +76,7 @@ static async Task Main(string[] args) // Generate the interface declarations var skippedTypes = new HashSet() { - "V1beta1Deployment", - "V1beta1DeploymentList", - "V1beta1DeploymentRollback", - "V1beta1DeploymentRollback", - "V1beta1Scale", - "V1beta1PodSecurityPolicy", - "V1beta1PodSecurityPolicyList", "V1WatchEvent", - "V1beta1Ingress", - "V1beta1IngressList" }; var definitions = swagger.Definitions.Values @@ -101,40 +85,7 @@ static async Task Main(string[] args) && d.ExtensionData.ContainsKey("x-kubernetes-group-version-kind") && !skippedTypes.Contains(GetClassName(d))); - // Render. - Render.FileToFile("ModelExtensions.cs.template", definitions, $"{outputDirectory}ModelExtensions.cs"); - } - - private static (string kubernetesBranch, string outputDirectory) LoadSettings(string path) - { - var fileInfo = new FileInfo(path); - - if (!fileInfo.Exists) - { - Console.Error.WriteLine("Cannot find csharp.settings"); - Environment.Exit(1); - } - - using (var s = new StreamReader(fileInfo.OpenRead())) - { - string l; - while ((l = s.ReadLine()) != null) - { - if (l.Contains("KUBERNETES_BRANCH")) - { - var kubernetesBranch = l.Split("=")[1]; - var outputDirectory = Path.Combine(fileInfo.DirectoryName, @"src/KubernetesClient/generated/"); - - Console.WriteLine($"Using branch {kubernetesBranch} output {outputDirectory}"); - - return (kubernetesBranch, outputDirectory); - } - } - } - - Console.Error.WriteLine("Cannot find KUBERNETES_BRANCH in csharp.settings"); - Environment.Exit(1); - return (null, null); + Render.FileToFile("ModelExtensions.cs.template", definitions, Path.Combine(outputDirectory, "ModelExtensions.cs")); } static void ToXmlDoc(RenderContext context, IList arguments, IDictionary options, RenderBlock fn, RenderBlock inverse) @@ -150,7 +101,7 @@ static void ToXmlDoc(RenderContext context, IList arguments, IDictionary { if (!first) { - context.Write(Environment.NewLine); + context.Write("\n"); context.Write(" /// "); } else @@ -178,12 +129,16 @@ static void GetClassName(RenderContext context, IList arguments, IDictio static string GetClassName(SwaggerOperation watchOperation) { var groupVersionKind = (Dictionary)watchOperation.ExtensionData["x-kubernetes-group-version-kind"]; + return GetClassName(groupVersionKind); + } + + private static string GetClassName(Dictionary groupVersionKind) + { var group = (string)groupVersionKind["group"]; var kind = (string)groupVersionKind["kind"]; var version = (string)groupVersionKind["version"]; - var className = $"{ToPascalCase(version)}{kind}"; - return className; + return ClassNameMap[$"{group}_{kind}_{version}"]; } private static string GetClassName(JsonSchema4 definition) @@ -191,11 +146,7 @@ private static string GetClassName(JsonSchema4 definition) var groupVersionKindElements = (object[])definition.ExtensionData["x-kubernetes-group-version-kind"]; var groupVersionKind = (Dictionary)groupVersionKindElements[0]; - var group = groupVersionKind["group"] as string; - var version = groupVersionKind["version"] as string; - var kind = groupVersionKind["kind"] as string; - - return $"{ToPascalCase(version)}{ToPascalCase(kind)}"; + return GetClassName(groupVersionKind); } static void GetKind(RenderContext context, IList arguments, IDictionary options, RenderBlock fn, RenderBlock inverse) @@ -350,7 +301,7 @@ private static string GetPathExpression(SwaggerOperationDescription operation) { string pathExpression = operation.Path; - if(pathExpression.StartsWith("/")) + if (pathExpression.StartsWith("/")) { pathExpression = pathExpression.Substring(1); } diff --git a/src/KubernetesClient/generated/IKubernetes.Watch.cs b/src/KubernetesClient/generated/IKubernetes.Watch.cs index e7411c781..69dbc42f9 100644 --- a/src/KubernetesClient/generated/IKubernetes.Watch.cs +++ b/src/KubernetesClient/generated/IKubernetes.Watch.cs @@ -2226,6 +2226,84 @@ Task> WatchNamespacedControllerRevisionAsync( Action onClosed = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + /// + /// This field is beta. + /// + /// + /// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + /// + /// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + /// + /// + /// A selector to restrict the list of returned objects by their fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. Defaults to everything. + /// + /// + /// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + /// + /// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + /// + /// + /// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The action to invoke when the server sends a new event. + /// + /// + /// The action to invoke when an error occurs. + /// + /// + /// The action to invoke when the server closes the connection. + /// + /// + /// A which can be used to cancel the asynchronous operation. + /// + /// + /// A which represents the asynchronous operation, and returns a new watcher. + /// + Task> WatchNamespacedDeploymentAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)); + /// /// watch changes to an object of kind StatefulSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. /// @@ -2460,6 +2538,84 @@ Task> WatchNamespacedDaemonSetAsync( Action onClosed = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + /// + /// This field is beta. + /// + /// + /// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + /// + /// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + /// + /// + /// A selector to restrict the list of returned objects by their fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. Defaults to everything. + /// + /// + /// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + /// + /// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + /// + /// + /// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The action to invoke when the server sends a new event. + /// + /// + /// The action to invoke when an error occurs. + /// + /// + /// The action to invoke when the server closes the connection. + /// + /// + /// A which can be used to cancel the asynchronous operation. + /// + /// + /// A which represents the asynchronous operation, and returns a new watcher. + /// + Task> WatchNamespacedDeploymentAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)); + /// /// watch changes to an object of kind ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. /// @@ -3623,10 +3779,10 @@ Task> WatchNamespacedDaemonSetAsync( CancellationToken cancellationToken = default(CancellationToken)); /// - /// watch changes to an object of kind ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. /// /// - /// name of the ReplicaSet + /// name of the Deployment /// /// /// object name and auth scope, such as for teams and projects @@ -3682,7 +3838,7 @@ Task> WatchNamespacedDaemonSetAsync( /// /// A which represents the asynchronous operation, and returns a new watcher. /// - Task> WatchNamespacedReplicaSetAsync( + Task> WatchNamespacedDeploymentAsync( string name, string @namespace, bool? allowWatchBookmarks = null, @@ -3695,7 +3851,85 @@ Task> WatchNamespacedReplicaSetAsync( int? timeoutSeconds = null, bool? watch = null, Dictionary> customHeaders = null, - Action onEvent = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// watch changes to an object of kind Ingress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + /// + /// This field is beta. + /// + /// + /// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + /// + /// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + /// + /// + /// A selector to restrict the list of returned objects by their fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. Defaults to everything. + /// + /// + /// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + /// + /// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + /// + /// + /// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The action to invoke when the server sends a new event. + /// + /// + /// The action to invoke when an error occurs. + /// + /// + /// The action to invoke when the server closes the connection. + /// + /// + /// A which can be used to cancel the asynchronous operation. + /// + /// + /// A which represents the asynchronous operation, and returns a new watcher. + /// + Task> WatchNamespacedIngressAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, Action onError = null, Action onClosed = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -3760,7 +3994,7 @@ Task> WatchNamespacedReplicaSetAsync( /// /// A which represents the asynchronous operation, and returns a new watcher. /// - Task> WatchNamespacedNetworkPolicyAsync( + Task> WatchNamespacedNetworkPolicyAsync( string name, string @namespace, bool? allowWatchBookmarks = null, @@ -3773,16 +4007,19 @@ Task> WatchNamespacedNetworkPolicyAsync( int? timeoutSeconds = null, bool? watch = null, Dictionary> customHeaders = null, - Action onEvent = null, + Action onEvent = null, Action onError = null, Action onClosed = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// watch changes to an object of kind RuntimeClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// watch changes to an object of kind ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. /// /// - /// name of the RuntimeClass + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects /// /// /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. @@ -3835,8 +4072,9 @@ Task> WatchNamespacedNetworkPolicyAsync( /// /// A which represents the asynchronous operation, and returns a new watcher. /// - Task> WatchRuntimeClassAsync( + Task> WatchNamespacedReplicaSetAsync( string name, + string @namespace, bool? allowWatchBookmarks = null, string @continue = null, string fieldSelector = null, @@ -3847,16 +4085,16 @@ Task> WatchRuntimeClassAsync( int? timeoutSeconds = null, bool? watch = null, Dictionary> customHeaders = null, - Action onEvent = null, + Action onEvent = null, Action onError = null, Action onClosed = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// watch changes to an object of kind RuntimeClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// watch changes to an object of kind PodSecurityPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. /// /// - /// name of the RuntimeClass + /// name of the PodSecurityPolicy /// /// /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. @@ -3909,7 +4147,7 @@ Task> WatchRuntimeClassAsync( /// /// A which represents the asynchronous operation, and returns a new watcher. /// - Task> WatchRuntimeClassAsync( + Task> WatchPodSecurityPolicyAsync( string name, bool? allowWatchBookmarks = null, string @continue = null, @@ -3921,16 +4159,16 @@ Task> WatchRuntimeClassAsync( int? timeoutSeconds = null, bool? watch = null, Dictionary> customHeaders = null, - Action onEvent = null, + Action onEvent = null, Action onError = null, Action onClosed = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// watch changes to an object of kind PodDisruptionBudget. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// watch changes to an object of kind NetworkPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. /// /// - /// name of the PodDisruptionBudget + /// name of the NetworkPolicy /// /// /// object name and auth scope, such as for teams and projects @@ -3986,7 +4224,311 @@ Task> WatchRuntimeClassAsync( /// /// A which represents the asynchronous operation, and returns a new watcher. /// - Task> WatchNamespacedPodDisruptionBudgetAsync( + Task> WatchNamespacedNetworkPolicyAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// watch changes to an object of kind Ingress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + /// + /// This field is beta. + /// + /// + /// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + /// + /// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + /// + /// + /// A selector to restrict the list of returned objects by their fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. Defaults to everything. + /// + /// + /// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + /// + /// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + /// + /// + /// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The action to invoke when the server sends a new event. + /// + /// + /// The action to invoke when an error occurs. + /// + /// + /// The action to invoke when the server closes the connection. + /// + /// + /// A which can be used to cancel the asynchronous operation. + /// + /// + /// A which represents the asynchronous operation, and returns a new watcher. + /// + Task> WatchNamespacedIngressAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// watch changes to an object of kind RuntimeClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// + /// + /// name of the RuntimeClass + /// + /// + /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + /// + /// This field is beta. + /// + /// + /// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + /// + /// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + /// + /// + /// A selector to restrict the list of returned objects by their fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. Defaults to everything. + /// + /// + /// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + /// + /// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + /// + /// + /// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The action to invoke when the server sends a new event. + /// + /// + /// The action to invoke when an error occurs. + /// + /// + /// The action to invoke when the server closes the connection. + /// + /// + /// A which can be used to cancel the asynchronous operation. + /// + /// + /// A which represents the asynchronous operation, and returns a new watcher. + /// + Task> WatchRuntimeClassAsync( + string name, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// watch changes to an object of kind RuntimeClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// + /// + /// name of the RuntimeClass + /// + /// + /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + /// + /// This field is beta. + /// + /// + /// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + /// + /// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + /// + /// + /// A selector to restrict the list of returned objects by their fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. Defaults to everything. + /// + /// + /// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + /// + /// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + /// + /// + /// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The action to invoke when the server sends a new event. + /// + /// + /// The action to invoke when an error occurs. + /// + /// + /// The action to invoke when the server closes the connection. + /// + /// + /// A which can be used to cancel the asynchronous operation. + /// + /// + /// A which represents the asynchronous operation, and returns a new watcher. + /// + Task> WatchRuntimeClassAsync( + string name, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// watch changes to an object of kind PodDisruptionBudget. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + /// + /// This field is beta. + /// + /// + /// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + /// + /// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + /// + /// + /// A selector to restrict the list of returned objects by their fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. Defaults to everything. + /// + /// + /// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + /// + /// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + /// + /// + /// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The action to invoke when the server sends a new event. + /// + /// + /// The action to invoke when an error occurs. + /// + /// + /// The action to invoke when the server closes the connection. + /// + /// + /// A which can be used to cancel the asynchronous operation. + /// + /// + /// A which represents the asynchronous operation, and returns a new watcher. + /// + Task> WatchNamespacedPodDisruptionBudgetAsync( string name, string @namespace, bool? allowWatchBookmarks = null, @@ -4004,6 +4546,80 @@ Task> WatchNamespacedPodDisruptionBudgetAsyn Action onClosed = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// watch changes to an object of kind PodSecurityPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + /// + /// This field is beta. + /// + /// + /// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + /// + /// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + /// + /// + /// A selector to restrict the list of returned objects by their fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. Defaults to everything. + /// + /// + /// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + /// + /// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + /// + /// + /// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The action to invoke when the server sends a new event. + /// + /// + /// The action to invoke when an error occurs. + /// + /// + /// The action to invoke when the server closes the connection. + /// + /// + /// A which can be used to cancel the asynchronous operation. + /// + /// + /// A which represents the asynchronous operation, and returns a new watcher. + /// + Task> WatchPodSecurityPolicyAsync( + string name, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)); + /// /// watch changes to an object of kind ClusterRoleBinding. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter. /// diff --git a/src/KubernetesClient/generated/Kubernetes.Watch.cs b/src/KubernetesClient/generated/Kubernetes.Watch.cs index 79f6c358b..7af06b550 100644 --- a/src/KubernetesClient/generated/Kubernetes.Watch.cs +++ b/src/KubernetesClient/generated/Kubernetes.Watch.cs @@ -664,6 +664,29 @@ public Task> WatchNamespacedControllerRevisio return WatchObjectAsync(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); } + /// + public Task> WatchNamespacedDeploymentAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)) + { + string path = $"apis/apps/v1beta1/watch/namespaces/{@namespace}/deployments/{name}"; + return WatchObjectAsync(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); + } + /// public Task> WatchNamespacedStatefulSetAsync( string name, @@ -733,6 +756,29 @@ public Task> WatchNamespacedDaemonSetAsync( return WatchObjectAsync(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); } + /// + public Task> WatchNamespacedDeploymentAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)) + { + string path = $"apis/apps/v1beta2/watch/namespaces/{@namespace}/deployments/{name}"; + return WatchObjectAsync(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); + } + /// public Task> WatchNamespacedReplicaSetAsync( string name, @@ -1076,6 +1122,75 @@ public Task> WatchNamespacedDaemonSetAsync( return WatchObjectAsync(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); } + /// + public Task> WatchNamespacedDeploymentAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)) + { + string path = $"apis/extensions/v1beta1/watch/namespaces/{@namespace}/deployments/{name}"; + return WatchObjectAsync(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); + } + + /// + public Task> WatchNamespacedIngressAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)) + { + string path = $"apis/extensions/v1beta1/watch/namespaces/{@namespace}/ingresses/{name}"; + return WatchObjectAsync(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); + } + + /// + public Task> WatchNamespacedNetworkPolicyAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)) + { + string path = $"apis/extensions/v1beta1/watch/namespaces/{@namespace}/networkpolicies/{name}"; + return WatchObjectAsync(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); + } + /// public Task> WatchNamespacedReplicaSetAsync( string name, @@ -1099,6 +1214,28 @@ public Task> WatchNamespacedReplicaSetAsync( return WatchObjectAsync(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); } + /// + public Task> WatchPodSecurityPolicyAsync( + string name, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)) + { + string path = $"apis/extensions/v1beta1/watch/podsecuritypolicies/{name}"; + return WatchObjectAsync(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); + } + /// public Task> WatchNamespacedNetworkPolicyAsync( string name, @@ -1122,6 +1259,29 @@ public Task> WatchNamespacedNetworkPolicyAsync( return WatchObjectAsync(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); } + /// + public Task> WatchNamespacedIngressAsync( + string name, + string @namespace, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)) + { + string path = $"apis/networking.k8s.io/v1beta1/watch/namespaces/{@namespace}/ingresses/{name}"; + return WatchObjectAsync(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); + } + /// public Task> WatchRuntimeClassAsync( string name, @@ -1189,6 +1349,28 @@ public Task> WatchNamespacedPodDisruptionBud return WatchObjectAsync(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); } + /// + public Task> WatchPodSecurityPolicyAsync( + string name, + bool? allowWatchBookmarks = null, + string @continue = null, + string fieldSelector = null, + string labelSelector = null, + int? limit = null, + bool? pretty = null, + string resourceVersion = null, + int? timeoutSeconds = null, + bool? watch = null, + Dictionary> customHeaders = null, + Action onEvent = null, + Action onError = null, + Action onClosed = null, + CancellationToken cancellationToken = default(CancellationToken)) + { + string path = $"apis/policy/v1beta1/watch/podsecuritypolicies/{name}"; + return WatchObjectAsync(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); + } + /// public Task> WatchClusterRoleBindingAsync( string name, diff --git a/src/KubernetesClient/generated/ModelExtensions.cs b/src/KubernetesClient/generated/ModelExtensions.cs index d6ca6cc67..1124beb1a 100644 --- a/src/KubernetesClient/generated/ModelExtensions.cs +++ b/src/KubernetesClient/generated/ModelExtensions.cs @@ -140,6 +140,34 @@ public partial class V1beta1ControllerRevisionList : IKubernetesObject public const string KubeGroup = "apps"; } + public partial class Appsv1beta1Deployment : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "Deployment"; + public const string KubeGroup = "apps"; + } + + public partial class Appsv1beta1DeploymentList : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "DeploymentList"; + public const string KubeGroup = "apps"; + } + + public partial class Appsv1beta1DeploymentRollback : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "DeploymentRollback"; + public const string KubeGroup = "apps"; + } + + public partial class Appsv1beta1Scale : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "Scale"; + public const string KubeGroup = "apps"; + } + public partial class V1beta1StatefulSet : IKubernetesObject { public const string KubeApiVersion = "v1beta1"; @@ -728,6 +756,41 @@ public partial class V1beta1DaemonSetList : IKubernetesObject public const string KubeGroup = "extensions"; } + public partial class Extensionsv1beta1Deployment : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "Deployment"; + public const string KubeGroup = "extensions"; + } + + public partial class Extensionsv1beta1DeploymentList : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "DeploymentList"; + public const string KubeGroup = "extensions"; + } + + public partial class Extensionsv1beta1DeploymentRollback : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "DeploymentRollback"; + public const string KubeGroup = "extensions"; + } + + public partial class Extensionsv1beta1Ingress : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "Ingress"; + public const string KubeGroup = "extensions"; + } + + public partial class Extensionsv1beta1IngressList : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "IngressList"; + public const string KubeGroup = "extensions"; + } + public partial class V1beta1NetworkPolicy : IKubernetesObject { public const string KubeApiVersion = "v1beta1"; @@ -742,6 +805,20 @@ public partial class V1beta1NetworkPolicyList : IKubernetesObject public const string KubeGroup = "extensions"; } + public partial class Extensionsv1beta1PodSecurityPolicy : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "PodSecurityPolicy"; + public const string KubeGroup = "extensions"; + } + + public partial class Extensionsv1beta1PodSecurityPolicyList : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "PodSecurityPolicyList"; + public const string KubeGroup = "extensions"; + } + public partial class V1beta1ReplicaSet : IKubernetesObject { public const string KubeApiVersion = "v1beta1"; @@ -756,6 +833,13 @@ public partial class V1beta1ReplicaSetList : IKubernetesObject public const string KubeGroup = "extensions"; } + public partial class Extensionsv1beta1Scale : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "Scale"; + public const string KubeGroup = "extensions"; + } + public partial class V1NetworkPolicy : IKubernetesObject { public const string KubeApiVersion = "v1"; @@ -770,6 +854,20 @@ public partial class V1NetworkPolicyList : IKubernetesObject public const string KubeGroup = "networking.k8s.io"; } + public partial class Networkingv1beta1Ingress : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "Ingress"; + public const string KubeGroup = "networking.k8s.io"; + } + + public partial class Networkingv1beta1IngressList : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "IngressList"; + public const string KubeGroup = "networking.k8s.io"; + } + public partial class V1alpha1RuntimeClass : IKubernetesObject { public const string KubeApiVersion = "v1alpha1"; @@ -819,6 +917,20 @@ public partial class V1beta1PodDisruptionBudgetList : IKubernetesObject public const string KubeGroup = "policy"; } + public partial class Policyv1beta1PodSecurityPolicy : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "PodSecurityPolicy"; + public const string KubeGroup = "policy"; + } + + public partial class Policyv1beta1PodSecurityPolicyList : IKubernetesObject + { + public const string KubeApiVersion = "v1beta1"; + public const string KubeKind = "PodSecurityPolicyList"; + public const string KubeGroup = "policy"; + } + public partial class V1ClusterRole : IKubernetesObject { public const string KubeApiVersion = "v1";