run generate script for k8s 1.12 (#205)

* generate for 1.12

* run watch generator

* bump version
This commit is contained in:
Boshi Lian
2018-10-03 13:38:37 -07:00
committed by k8s-ci-robot
parent 9372e3291f
commit df3381607a
64 changed files with 32919 additions and 6091 deletions

View File

@@ -1,3 +1,3 @@
export KUBERNETES_BRANCH=v1.11.0
export KUBERNETES_BRANCH=v1.12.0
export CLIENT_VERSION=0.0.1
export PACKAGE_NAME=k8s

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -781,6 +781,29 @@ namespace k8s
return WatchObjectAsync<V2beta1HorizontalPodAutoscaler>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V2beta2HorizontalPodAutoscaler>> WatchNamespacedHorizontalPodAutoscalerAsync(
string name,
string @namespace,
string @continue = null,
string fieldSelector = null,
bool? includeUninitialized = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V2beta2HorizontalPodAutoscaler> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/autoscaling/v2beta2/watch/namespaces/{@namespace}/horizontalpodautoscalers/{name}";
return WatchObjectAsync<V2beta2HorizontalPodAutoscaler>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1Job>> WatchNamespacedJobAsync(
string name,
@@ -872,6 +895,29 @@ namespace k8s
return WatchObjectAsync<V1beta1CertificateSigningRequest>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1beta1Lease>> WatchNamespacedLeaseAsync(
string name,
string @namespace,
string @continue = null,
string fieldSelector = null,
bool? includeUninitialized = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1Lease> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/coordination.k8s.io/v1beta1/watch/namespaces/{@namespace}/leases/{name}";
return WatchObjectAsync<V1beta1Lease>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1beta1Event>> WatchNamespacedEventAsync(
string name,
@@ -1317,10 +1363,11 @@ namespace k8s
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1PriorityClass> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/scheduling.k8s.io/v1beta1/watch/priorityclasses/{name}";
return WatchObjectAsync<V1beta1PriorityClass>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, cancellationToken: cancellationToken);
return WatchObjectAsync<V1beta1PriorityClass>(path: path, @continue: @continue, fieldSelector: fieldSelector, includeUninitialized: includeUninitialized, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -322,6 +322,20 @@ namespace k8s.Models
public const string KubeGroup = "autoscaling";
}
public partial class V2beta2HorizontalPodAutoscaler : IKubernetesObject
{
public const string KubeApiVersion = "v2beta2";
public const string KubeKind = "HorizontalPodAutoscaler";
public const string KubeGroup = "autoscaling";
}
public partial class V2beta2HorizontalPodAutoscalerList : IKubernetesObject
{
public const string KubeApiVersion = "v2beta2";
public const string KubeKind = "HorizontalPodAutoscalerList";
public const string KubeGroup = "autoscaling";
}
public partial class V1Job : IKubernetesObject
{
public const string KubeApiVersion = "v1";
@@ -378,6 +392,20 @@ namespace k8s.Models
public const string KubeGroup = "certificates.k8s.io";
}
public partial class V1beta1Lease : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "Lease";
public const string KubeGroup = "coordination.k8s.io";
}
public partial class V1beta1LeaseList : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "LeaseList";
public const string KubeGroup = "coordination.k8s.io";
}
public partial class V1Binding : IKubernetesObject
{
public const string KubeApiVersion = "v1";

View File

@@ -43,7 +43,8 @@ namespace k8s.Models
/// deployments and a condition with a ProgressDeadlineExceeded reason
/// will be surfaced in the deployment status. Note that progress will
/// not be estimated during the time a deployment is paused. This is
/// not set by default.</param>
/// set to the max value of int32 (i.e. 2147483647) by default, which
/// means "no deadline".</param>
/// <param name="replicas">Number of desired pods. This is a pointer to
/// distinguish between explicit zero and not specified. Defaults to
/// 1.</param>
@@ -98,7 +99,9 @@ namespace k8s.Models
/// controller will continue to process failed deployments and a
/// condition with a ProgressDeadlineExceeded reason will be surfaced
/// in the deployment status. Note that progress will not be estimated
/// during the time a deployment is paused. This is not set by default.
/// during the time a deployment is paused. This is set to the max
/// value of int32 (i.e. 2147483647) by default, which means "no
/// deadline".
/// </summary>
[JsonProperty(PropertyName = "progressDeadlineSeconds")]
public int? ProgressDeadlineSeconds { get; set; }

View File

@@ -55,6 +55,10 @@ namespace k8s.Models
/// <param name="allowedHostPaths">allowedHostPaths is a white list of
/// allowed host paths. Empty indicates that all host paths may be
/// used.</param>
/// <param name="allowedProcMountTypes">AllowedProcMountTypes is a
/// whitelist of allowed ProcMountTypes. Empty or nil indicates that
/// only the DefaultProcMountType may be used. This requires the
/// ProcMountType feature flag to be enabled.</param>
/// <param name="allowedUnsafeSysctls">allowedUnsafeSysctls is a list
/// of explicitly allowed unsafe sysctls, defaults to none. Each entry
/// is either a plain sysctl name or ends in "*" in which case it is
@@ -105,12 +109,13 @@ namespace k8s.Models
/// <param name="volumes">volumes is a white list of allowed volume
/// plugins. Empty indicates that no volumes may be used. To allow all
/// volumes you may use '*'.</param>
public Extensionsv1beta1PodSecurityPolicySpec(Extensionsv1beta1FSGroupStrategyOptions fsGroup, Extensionsv1beta1RunAsUserStrategyOptions runAsUser, Extensionsv1beta1SELinuxStrategyOptions seLinux, Extensionsv1beta1SupplementalGroupsStrategyOptions supplementalGroups, bool? allowPrivilegeEscalation = default(bool?), IList<string> allowedCapabilities = default(IList<string>), IList<Extensionsv1beta1AllowedFlexVolume> allowedFlexVolumes = default(IList<Extensionsv1beta1AllowedFlexVolume>), IList<Extensionsv1beta1AllowedHostPath> allowedHostPaths = default(IList<Extensionsv1beta1AllowedHostPath>), IList<string> allowedUnsafeSysctls = default(IList<string>), IList<string> defaultAddCapabilities = default(IList<string>), bool? defaultAllowPrivilegeEscalation = default(bool?), IList<string> forbiddenSysctls = default(IList<string>), bool? hostIPC = default(bool?), bool? hostNetwork = default(bool?), bool? hostPID = default(bool?), IList<Extensionsv1beta1HostPortRange> hostPorts = default(IList<Extensionsv1beta1HostPortRange>), bool? privileged = default(bool?), bool? readOnlyRootFilesystem = default(bool?), IList<string> requiredDropCapabilities = default(IList<string>), IList<string> volumes = default(IList<string>))
public Extensionsv1beta1PodSecurityPolicySpec(Extensionsv1beta1FSGroupStrategyOptions fsGroup, Extensionsv1beta1RunAsUserStrategyOptions runAsUser, Extensionsv1beta1SELinuxStrategyOptions seLinux, Extensionsv1beta1SupplementalGroupsStrategyOptions supplementalGroups, bool? allowPrivilegeEscalation = default(bool?), IList<string> allowedCapabilities = default(IList<string>), IList<Extensionsv1beta1AllowedFlexVolume> allowedFlexVolumes = default(IList<Extensionsv1beta1AllowedFlexVolume>), IList<Extensionsv1beta1AllowedHostPath> allowedHostPaths = default(IList<Extensionsv1beta1AllowedHostPath>), IList<string> allowedProcMountTypes = default(IList<string>), IList<string> allowedUnsafeSysctls = default(IList<string>), IList<string> defaultAddCapabilities = default(IList<string>), bool? defaultAllowPrivilegeEscalation = default(bool?), IList<string> forbiddenSysctls = default(IList<string>), bool? hostIPC = default(bool?), bool? hostNetwork = default(bool?), bool? hostPID = default(bool?), IList<Extensionsv1beta1HostPortRange> hostPorts = default(IList<Extensionsv1beta1HostPortRange>), bool? privileged = default(bool?), bool? readOnlyRootFilesystem = default(bool?), IList<string> requiredDropCapabilities = default(IList<string>), IList<string> volumes = default(IList<string>))
{
AllowPrivilegeEscalation = allowPrivilegeEscalation;
AllowedCapabilities = allowedCapabilities;
AllowedFlexVolumes = allowedFlexVolumes;
AllowedHostPaths = allowedHostPaths;
AllowedProcMountTypes = allowedProcMountTypes;
AllowedUnsafeSysctls = allowedUnsafeSysctls;
DefaultAddCapabilities = defaultAddCapabilities;
DefaultAllowPrivilegeEscalation = defaultAllowPrivilegeEscalation;
@@ -169,6 +174,15 @@ namespace k8s.Models
[JsonProperty(PropertyName = "allowedHostPaths")]
public IList<Extensionsv1beta1AllowedHostPath> AllowedHostPaths { get; set; }
/// <summary>
/// Gets or sets allowedProcMountTypes is a whitelist of allowed
/// ProcMountTypes. Empty or nil indicates that only the
/// DefaultProcMountType may be used. This requires the ProcMountType
/// feature flag to be enabled.
/// </summary>
[JsonProperty(PropertyName = "allowedProcMountTypes")]
public IList<string> AllowedProcMountTypes { get; set; }
/// <summary>
/// Gets or sets allowedUnsafeSysctls is a list of explicitly allowed
/// unsafe sysctls, defaults to none. Each entry is either a plain

View File

@@ -54,6 +54,10 @@ namespace k8s.Models
/// <param name="allowedHostPaths">allowedHostPaths is a white list of
/// allowed host paths. Empty indicates that all host paths may be
/// used.</param>
/// <param name="allowedProcMountTypes">AllowedProcMountTypes is a
/// whitelist of allowed ProcMountTypes. Empty or nil indicates that
/// only the DefaultProcMountType may be used. This requires the
/// ProcMountType feature flag to be enabled.</param>
/// <param name="allowedUnsafeSysctls">allowedUnsafeSysctls is a list
/// of explicitly allowed unsafe sysctls, defaults to none. Each entry
/// is either a plain sysctl name or ends in "*" in which case it is
@@ -104,12 +108,13 @@ namespace k8s.Models
/// <param name="volumes">volumes is a white list of allowed volume
/// plugins. Empty indicates that no volumes may be used. To allow all
/// volumes you may use '*'.</param>
public Policyv1beta1PodSecurityPolicySpec(Policyv1beta1FSGroupStrategyOptions fsGroup, Policyv1beta1RunAsUserStrategyOptions runAsUser, Policyv1beta1SELinuxStrategyOptions seLinux, Policyv1beta1SupplementalGroupsStrategyOptions supplementalGroups, bool? allowPrivilegeEscalation = default(bool?), IList<string> allowedCapabilities = default(IList<string>), IList<Policyv1beta1AllowedFlexVolume> allowedFlexVolumes = default(IList<Policyv1beta1AllowedFlexVolume>), IList<Policyv1beta1AllowedHostPath> allowedHostPaths = default(IList<Policyv1beta1AllowedHostPath>), IList<string> allowedUnsafeSysctls = default(IList<string>), IList<string> defaultAddCapabilities = default(IList<string>), bool? defaultAllowPrivilegeEscalation = default(bool?), IList<string> forbiddenSysctls = default(IList<string>), bool? hostIPC = default(bool?), bool? hostNetwork = default(bool?), bool? hostPID = default(bool?), IList<Policyv1beta1HostPortRange> hostPorts = default(IList<Policyv1beta1HostPortRange>), bool? privileged = default(bool?), bool? readOnlyRootFilesystem = default(bool?), IList<string> requiredDropCapabilities = default(IList<string>), IList<string> volumes = default(IList<string>))
public Policyv1beta1PodSecurityPolicySpec(Policyv1beta1FSGroupStrategyOptions fsGroup, Policyv1beta1RunAsUserStrategyOptions runAsUser, Policyv1beta1SELinuxStrategyOptions seLinux, Policyv1beta1SupplementalGroupsStrategyOptions supplementalGroups, bool? allowPrivilegeEscalation = default(bool?), IList<string> allowedCapabilities = default(IList<string>), IList<Policyv1beta1AllowedFlexVolume> allowedFlexVolumes = default(IList<Policyv1beta1AllowedFlexVolume>), IList<Policyv1beta1AllowedHostPath> allowedHostPaths = default(IList<Policyv1beta1AllowedHostPath>), IList<string> allowedProcMountTypes = default(IList<string>), IList<string> allowedUnsafeSysctls = default(IList<string>), IList<string> defaultAddCapabilities = default(IList<string>), bool? defaultAllowPrivilegeEscalation = default(bool?), IList<string> forbiddenSysctls = default(IList<string>), bool? hostIPC = default(bool?), bool? hostNetwork = default(bool?), bool? hostPID = default(bool?), IList<Policyv1beta1HostPortRange> hostPorts = default(IList<Policyv1beta1HostPortRange>), bool? privileged = default(bool?), bool? readOnlyRootFilesystem = default(bool?), IList<string> requiredDropCapabilities = default(IList<string>), IList<string> volumes = default(IList<string>))
{
AllowPrivilegeEscalation = allowPrivilegeEscalation;
AllowedCapabilities = allowedCapabilities;
AllowedFlexVolumes = allowedFlexVolumes;
AllowedHostPaths = allowedHostPaths;
AllowedProcMountTypes = allowedProcMountTypes;
AllowedUnsafeSysctls = allowedUnsafeSysctls;
DefaultAddCapabilities = defaultAddCapabilities;
DefaultAllowPrivilegeEscalation = defaultAllowPrivilegeEscalation;
@@ -168,6 +173,15 @@ namespace k8s.Models
[JsonProperty(PropertyName = "allowedHostPaths")]
public IList<Policyv1beta1AllowedHostPath> AllowedHostPaths { get; set; }
/// <summary>
/// Gets or sets allowedProcMountTypes is a whitelist of allowed
/// ProcMountTypes. Empty or nil indicates that only the
/// DefaultProcMountType may be used. This requires the ProcMountType
/// feature flag to be enabled.
/// </summary>
[JsonProperty(PropertyName = "allowedProcMountTypes")]
public IList<string> AllowedProcMountTypes { get; set; }
/// <summary>
/// Gets or sets allowedUnsafeSysctls is a list of explicitly allowed
/// unsafe sysctls, defaults to none. Each entry is either a plain

View File

@@ -45,7 +45,7 @@ namespace k8s.Models
/// passed.</param>
/// <param name="fsType">Filesystem type to mount. Must be a filesystem
/// type supported by the host operating system. Ex. "ext4", "xfs",
/// "ntfs". Implicitly inferred to be "ext4" if unspecified.</param>
/// "ntfs".</param>
/// <param name="nodePublishSecretRef">NodePublishSecretRef is a
/// reference to the secret object containing sensitive information to
/// pass to the CSI driver to complete the CSI NodePublishVolume and
@@ -103,7 +103,6 @@ namespace k8s.Models
/// <summary>
/// Gets or sets filesystem type to mount. Must be a filesystem type
/// supported by the host operating system. Ex. "ext4", "xfs", "ntfs".
/// Implicitly inferred to be "ext4" if unspecified.
/// </summary>
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }

View File

@@ -87,7 +87,7 @@ namespace k8s.Models
/// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</param>
/// <param name="resources">Compute Resources required by this
/// container. Cannot be updated. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources</param>
/// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/</param>
/// <param name="securityContext">Security options the pod should run
/// with. More info:
/// https://kubernetes.io/docs/concepts/policy/security-context/ More
@@ -277,7 +277,7 @@ namespace k8s.Models
/// <summary>
/// Gets or sets compute Resources required by this container. Cannot
/// be updated. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
/// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
/// </summary>
[JsonProperty(PropertyName = "resources")]
public V1ResourceRequirements Resources { get; set; }

View File

@@ -38,8 +38,8 @@ namespace k8s.Models
/// unique within the pod. Each named port in a pod must have a unique
/// name. Name for the port that can be referred to by
/// services.</param>
/// <param name="protocol">Protocol for port. Must be UDP or TCP.
/// Defaults to "TCP".</param>
/// <param name="protocol">Protocol for port. Must be UDP, TCP, or
/// SCTP. Defaults to "TCP".</param>
public V1ContainerPort(int containerPort, string hostIP = default(string), int? hostPort = default(int?), string name = default(string), string protocol = default(string))
{
ContainerPort = containerPort;
@@ -86,8 +86,8 @@ namespace k8s.Models
public string Name { get; set; }
/// <summary>
/// Gets or sets protocol for port. Must be UDP or TCP. Defaults to
/// "TCP".
/// Gets or sets protocol for port. Must be UDP, TCP, or SCTP. Defaults
/// to "TCP".
/// </summary>
[JsonProperty(PropertyName = "protocol")]
public string Protocol { get; set; }

View File

@@ -7,6 +7,8 @@
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
@@ -30,6 +32,11 @@ namespace k8s.Models
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</param>
/// <param name="dryRun">When present, indicates that modifications
/// should not be persisted. An invalid or unrecognized dryRun
/// directive will result in an error response and no further
/// processing of the request. Valid values are: - All: all dry run
/// stages will be processed</param>
/// <param name="gracePeriodSeconds">The duration in seconds before the
/// object should be deleted. Value must be non-negative integer. The
/// value zero indicates delete immediately. If this value is nil, the
@@ -58,9 +65,10 @@ namespace k8s.Models
/// dependents; 'Background' - allow the garbage collector to delete
/// the dependents in the background; 'Foreground' - a cascading policy
/// that deletes all dependents in the foreground.</param>
public V1DeleteOptions(string apiVersion = default(string), long? gracePeriodSeconds = default(long?), string kind = default(string), bool? orphanDependents = default(bool?), V1Preconditions preconditions = default(V1Preconditions), string propagationPolicy = default(string))
public V1DeleteOptions(string apiVersion = default(string), IList<string> dryRun = default(IList<string>), long? gracePeriodSeconds = default(long?), string kind = default(string), bool? orphanDependents = default(bool?), V1Preconditions preconditions = default(V1Preconditions), string propagationPolicy = default(string))
{
ApiVersion = apiVersion;
DryRun = dryRun;
GracePeriodSeconds = gracePeriodSeconds;
Kind = kind;
OrphanDependents = orphanDependents;
@@ -84,6 +92,16 @@ namespace k8s.Models
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets when present, indicates that modifications should not
/// be persisted. An invalid or unrecognized dryRun directive will
/// result in an error response and no further processing of the
/// request. Valid values are: - All: all dry run stages will be
/// processed
/// </summary>
[JsonProperty(PropertyName = "dryRun")]
public IList<string> DryRun { get; set; }
/// <summary>
/// Gets or sets the duration in seconds before the object should be
/// deleted. Value must be non-negative integer. The value zero

View File

@@ -29,8 +29,8 @@ namespace k8s.Models
/// <param name="name">The name of this port (corresponds to
/// ServicePort.Name). Must be a DNS_LABEL. Optional only if one port
/// is defined.</param>
/// <param name="protocol">The IP protocol for this port. Must be UDP
/// or TCP. Default is TCP.</param>
/// <param name="protocol">The IP protocol for this port. Must be UDP,
/// TCP, or SCTP. Default is TCP.</param>
public V1EndpointPort(int port, string name = default(string), string protocol = default(string))
{
Name = name;
@@ -59,8 +59,8 @@ namespace k8s.Models
public int Port { get; set; }
/// <summary>
/// Gets or sets the IP protocol for this port. Must be UDP or TCP.
/// Default is TCP.
/// Gets or sets the IP protocol for this port. Must be UDP, TCP, or
/// SCTP. Default is TCP.
/// </summary>
[JsonProperty(PropertyName = "protocol")]
public string Protocol { get; set; }

View File

@@ -63,7 +63,17 @@ namespace k8s.Models
/// the pod count. Normally, the system sets this field for you. More
/// info:
/// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors</param>
public V1JobSpec(V1PodTemplateSpec template, long? activeDeadlineSeconds = default(long?), int? backoffLimit = default(int?), int? completions = default(int?), bool? manualSelector = default(bool?), int? parallelism = default(int?), V1LabelSelector selector = default(V1LabelSelector))
/// <param name="ttlSecondsAfterFinished">ttlSecondsAfterFinished
/// limits the lifetime of a Job that has finished execution (either
/// Complete or Failed). If this field is set, ttlSecondsAfterFinished
/// after the Job finishes, it is eligible to be automatically deleted.
/// When the Job is being deleted, its lifecycle guarantees (e.g.
/// finalizers) will be honored. If this field is unset, the Job won't
/// be automatically deleted. If this field is set to zero, the Job
/// becomes eligible to be deleted immediately after it finishes. This
/// field is alpha-level and is only honored by servers that enable the
/// TTLAfterFinished feature.</param>
public V1JobSpec(V1PodTemplateSpec template, long? activeDeadlineSeconds = default(long?), int? backoffLimit = default(int?), int? completions = default(int?), bool? manualSelector = default(bool?), int? parallelism = default(int?), V1LabelSelector selector = default(V1LabelSelector), int? ttlSecondsAfterFinished = default(int?))
{
ActiveDeadlineSeconds = activeDeadlineSeconds;
BackoffLimit = backoffLimit;
@@ -72,6 +82,7 @@ namespace k8s.Models
Parallelism = parallelism;
Selector = selector;
Template = template;
TtlSecondsAfterFinished = ttlSecondsAfterFinished;
CustomInit();
}
@@ -149,6 +160,21 @@ namespace k8s.Models
[JsonProperty(PropertyName = "template")]
public V1PodTemplateSpec Template { get; set; }
/// <summary>
/// Gets or sets ttlSecondsAfterFinished limits the lifetime of a Job
/// that has finished execution (either Complete or Failed). If this
/// field is set, ttlSecondsAfterFinished after the Job finishes, it is
/// eligible to be automatically deleted. When the Job is being
/// deleted, its lifecycle guarantees (e.g. finalizers) will be
/// honored. If this field is unset, the Job won't be automatically
/// deleted. If this field is set to zero, the Job becomes eligible to
/// be deleted immediately after it finishes. This field is alpha-level
/// and is only honored by servers that enable the TTLAfterFinished
/// feature.
/// </summary>
[JsonProperty(PropertyName = "ttlSecondsAfterFinished")]
public int? TtlSecondsAfterFinished { get; set; }
/// <summary>
/// Validate the object.
/// </summary>

View File

@@ -31,11 +31,12 @@ namespace k8s.Models
/// a limit on the number of items returned, and indicates that the
/// server has more data available. The value is opaque and may be used
/// to issue another request to the endpoint that served this list to
/// retrieve the next set of available objects. Continuing a list may
/// not be possible if the server configuration has changed or more
/// than a few minutes have passed. The resourceVersion field returned
/// when using this continue value will be identical to the value in
/// the first response.</param>
/// retrieve the next set of available objects. Continuing a consistent
/// list may not be possible if the server configuration has changed or
/// more than a few minutes have passed. The resourceVersion field
/// returned when using this continue value will be identical to the
/// value in the first response, unless you have received this token
/// from an error message.</param>
/// <param name="resourceVersion">String that identifies the server's
/// internal version of this object that can be used by clients to
/// determine when objects have changed. Value must be treated as
@@ -62,11 +63,12 @@ namespace k8s.Models
/// number of items returned, and indicates that the server has more
/// data available. The value is opaque and may be used to issue
/// another request to the endpoint that served this list to retrieve
/// the next set of available objects. Continuing a list may not be
/// possible if the server configuration has changed or more than a few
/// minutes have passed. The resourceVersion field returned when using
/// this continue value will be identical to the value in the first
/// response.
/// the next set of available objects. Continuing a consistent list may
/// not be possible if the server configuration has changed or more
/// than a few minutes have passed. The resourceVersion field returned
/// when using this continue value will be identical to the value in
/// the first response, unless you have received this token from an
/// error message.
/// </summary>
[JsonProperty(PropertyName = "continue")]
public string ContinueProperty { get; set; }

View File

@@ -28,13 +28,15 @@ namespace k8s.Models
/// Initializes a new instance of the V1LocalVolumeSource class.
/// </summary>
/// <param name="path">The full path to the volume on the node. It can
/// be either a directory or block device (disk, partition, ...).
/// Directories can be represented only by PersistentVolume with
/// VolumeMode=Filesystem. Block devices can be represented only by
/// VolumeMode=Block, which also requires the BlockVolume alpha feature
/// gate to be enabled.</param>
public V1LocalVolumeSource(string path)
/// be either a directory or block device (disk, partition,
/// ...).</param>
/// <param name="fsType">Filesystem type to mount. It applies only when
/// the Path is a block device. Must be a filesystem type supported by
/// the host operating system. Ex. "ext4", "xfs", "ntfs". The default
/// value is to auto-select a fileystem if unspecified.</param>
public V1LocalVolumeSource(string path, string fsType = default(string))
{
FsType = fsType;
Path = path;
CustomInit();
}
@@ -44,13 +46,18 @@ namespace k8s.Models
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets filesystem type to mount. It applies only when the
/// Path is a block device. Must be a filesystem type supported by the
/// host operating system. Ex. "ext4", "xfs", "ntfs". The default value
/// is to auto-select a fileystem if unspecified.
/// </summary>
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }
/// <summary>
/// Gets or sets the full path to the volume on the node. It can be
/// either a directory or block device (disk, partition, ...).
/// Directories can be represented only by PersistentVolume with
/// VolumeMode=Filesystem. Block devices can be represented only by
/// VolumeMode=Block, which also requires the BlockVolume alpha feature
/// gate to be enabled.
/// </summary>
[JsonProperty(PropertyName = "path")]
public string Path { get; set; }

View File

@@ -28,8 +28,9 @@ namespace k8s.Models
/// <param name="port">The port on the given protocol. This can either
/// be a numerical or named port on a pod. If this field is not
/// provided, this matches all port names and numbers.</param>
/// <param name="protocol">The protocol (TCP or UDP) which traffic must
/// match. If not specified, this field defaults to TCP.</param>
/// <param name="protocol">The protocol (TCP, UDP, or SCTP) which
/// traffic must match. If not specified, this field defaults to
/// TCP.</param>
public V1NetworkPolicyPort(IntstrIntOrString port = default(IntstrIntOrString), string protocol = default(string))
{
Port = port;
@@ -51,8 +52,8 @@ namespace k8s.Models
public IntstrIntOrString Port { get; set; }
/// <summary>
/// Gets or sets the protocol (TCP or UDP) which traffic must match. If
/// not specified, this field defaults to TCP.
/// Gets or sets the protocol (TCP, UDP, or SCTP) which traffic must
/// match. If not specified, this field defaults to TCP.
/// </summary>
[JsonProperty(PropertyName = "protocol")]
public string Protocol { get; set; }

View File

@@ -115,6 +115,10 @@ namespace k8s.Models
{
Metadata.Validate();
}
if (Spec != null)
{
Spec.Validate();
}
}
}
}

View File

@@ -33,6 +33,15 @@ namespace k8s.Models
/// <param name="accessModes">AccessModes contains the desired access
/// modes the volume should have. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1</param>
/// <param name="dataSource">This field requires the
/// VolumeSnapshotDataSource alpha feature gate to be enabled and
/// currently VolumeSnapshot is the only supported data source. If the
/// provisioner can support VolumeSnapshot data source, it will create
/// a new volume and data will be restored to the volume at the same
/// time. If the provisioner does not support VolumeSnapshot data
/// source, volume will not be created and the failure will be reported
/// as an event. In the future, we plan to support more data source
/// types and the behavior of the provisioner may change.</param>
/// <param name="resources">Resources represents the minimum resources
/// the volume should have. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources</param>
@@ -47,9 +56,10 @@ namespace k8s.Models
/// the future.</param>
/// <param name="volumeName">VolumeName is the binding reference to the
/// PersistentVolume backing this claim.</param>
public V1PersistentVolumeClaimSpec(IList<string> accessModes = default(IList<string>), V1ResourceRequirements resources = default(V1ResourceRequirements), V1LabelSelector selector = default(V1LabelSelector), string storageClassName = default(string), string volumeMode = default(string), string volumeName = default(string))
public V1PersistentVolumeClaimSpec(IList<string> accessModes = default(IList<string>), V1TypedLocalObjectReference dataSource = default(V1TypedLocalObjectReference), V1ResourceRequirements resources = default(V1ResourceRequirements), V1LabelSelector selector = default(V1LabelSelector), string storageClassName = default(string), string volumeMode = default(string), string volumeName = default(string))
{
AccessModes = accessModes;
DataSource = dataSource;
Resources = resources;
Selector = selector;
StorageClassName = storageClassName;
@@ -71,6 +81,20 @@ namespace k8s.Models
[JsonProperty(PropertyName = "accessModes")]
public IList<string> AccessModes { get; set; }
/// <summary>
/// Gets or sets this field requires the VolumeSnapshotDataSource alpha
/// feature gate to be enabled and currently VolumeSnapshot is the only
/// supported data source. If the provisioner can support
/// VolumeSnapshot data source, it will create a new volume and data
/// will be restored to the volume at the same time. If the provisioner
/// does not support VolumeSnapshot data source, volume will not be
/// created and the failure will be reported as an event. In the
/// future, we plan to support more data source types and the behavior
/// of the provisioner may change.
/// </summary>
[JsonProperty(PropertyName = "dataSource")]
public V1TypedLocalObjectReference DataSource { get; set; }
/// <summary>
/// Gets or sets resources represents the minimum resources the volume
/// should have. More info:
@@ -108,5 +132,18 @@ namespace k8s.Models
[JsonProperty(PropertyName = "volumeName")]
public string VolumeName { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (DataSource != null)
{
DataSource.Validate();
}
}
}
}

View File

@@ -114,6 +114,14 @@ namespace k8s.Models
/// within the pod. One of Always, OnFailure, Never. Default to Always.
/// More info:
/// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy</param>
/// <param name="runtimeClassName">RuntimeClassName refers to a
/// RuntimeClass object in the node.k8s.io group, which should be used
/// to run this pod. If no RuntimeClass resource matches the named
/// class, the pod will not be run. If unset or empty, the "legacy"
/// RuntimeClass will be used, which is an implicit class with an empty
/// definition that uses the default runtime handler. More info:
/// https://github.com/kubernetes/community/blob/master/keps/sig-node/0014-runtime-class.md
/// This is an alpha feature and may change in the future.</param>
/// <param name="schedulerName">If specified, the pod will be
/// dispatched by specified scheduler. If not specified, the pod will
/// be dispatched by default scheduler.</param>
@@ -133,8 +141,8 @@ namespace k8s.Models
/// containers in the same pod, and the first process in each container
/// will not be assigned PID 1. HostPID and ShareProcessNamespace
/// cannot both be set. Optional: Default to false. This field is
/// alpha-level and is honored only by servers that enable the
/// PodShareProcessNamespace feature.</param>
/// beta-level and may be disabled with the PodShareProcessNamespace
/// feature.</param>
/// <param name="subdomain">If specified, the fully qualified Pod
/// hostname will be "&lt;hostname&gt;.&lt;subdomain&gt;.&lt;pod
/// namespace&gt;.svc.&lt;cluster domain&gt;". If not specified, the
@@ -153,7 +161,7 @@ namespace k8s.Models
/// <param name="volumes">List of volumes that can be mounted by
/// containers belonging to the pod. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes</param>
public V1PodSpec(IList<V1Container> containers, long? activeDeadlineSeconds = default(long?), V1Affinity affinity = default(V1Affinity), bool? automountServiceAccountToken = default(bool?), V1PodDNSConfig dnsConfig = default(V1PodDNSConfig), string dnsPolicy = default(string), IList<V1HostAlias> hostAliases = default(IList<V1HostAlias>), bool? hostIPC = default(bool?), bool? hostNetwork = default(bool?), bool? hostPID = default(bool?), string hostname = default(string), IList<V1LocalObjectReference> imagePullSecrets = default(IList<V1LocalObjectReference>), IList<V1Container> initContainers = default(IList<V1Container>), string nodeName = default(string), IDictionary<string, string> nodeSelector = default(IDictionary<string, string>), int? priority = default(int?), string priorityClassName = default(string), IList<V1PodReadinessGate> readinessGates = default(IList<V1PodReadinessGate>), string restartPolicy = default(string), string schedulerName = default(string), V1PodSecurityContext securityContext = default(V1PodSecurityContext), string serviceAccount = default(string), string serviceAccountName = default(string), bool? shareProcessNamespace = default(bool?), string subdomain = default(string), long? terminationGracePeriodSeconds = default(long?), IList<V1Toleration> tolerations = default(IList<V1Toleration>), IList<V1Volume> volumes = default(IList<V1Volume>))
public V1PodSpec(IList<V1Container> containers, long? activeDeadlineSeconds = default(long?), V1Affinity affinity = default(V1Affinity), bool? automountServiceAccountToken = default(bool?), V1PodDNSConfig dnsConfig = default(V1PodDNSConfig), string dnsPolicy = default(string), IList<V1HostAlias> hostAliases = default(IList<V1HostAlias>), bool? hostIPC = default(bool?), bool? hostNetwork = default(bool?), bool? hostPID = default(bool?), string hostname = default(string), IList<V1LocalObjectReference> imagePullSecrets = default(IList<V1LocalObjectReference>), IList<V1Container> initContainers = default(IList<V1Container>), string nodeName = default(string), IDictionary<string, string> nodeSelector = default(IDictionary<string, string>), int? priority = default(int?), string priorityClassName = default(string), IList<V1PodReadinessGate> readinessGates = default(IList<V1PodReadinessGate>), string restartPolicy = default(string), string runtimeClassName = default(string), string schedulerName = default(string), V1PodSecurityContext securityContext = default(V1PodSecurityContext), string serviceAccount = default(string), string serviceAccountName = default(string), bool? shareProcessNamespace = default(bool?), string subdomain = default(string), long? terminationGracePeriodSeconds = default(long?), IList<V1Toleration> tolerations = default(IList<V1Toleration>), IList<V1Volume> volumes = default(IList<V1Volume>))
{
ActiveDeadlineSeconds = activeDeadlineSeconds;
Affinity = affinity;
@@ -174,6 +182,7 @@ namespace k8s.Models
PriorityClassName = priorityClassName;
ReadinessGates = readinessGates;
RestartPolicy = restartPolicy;
RuntimeClassName = runtimeClassName;
SchedulerName = schedulerName;
SecurityContext = securityContext;
ServiceAccount = serviceAccount;
@@ -366,6 +375,19 @@ namespace k8s.Models
[JsonProperty(PropertyName = "restartPolicy")]
public string RestartPolicy { get; set; }
/// <summary>
/// Gets or sets runtimeClassName refers to a RuntimeClass object in
/// the node.k8s.io group, which should be used to run this pod. If no
/// RuntimeClass resource matches the named class, the pod will not be
/// run. If unset or empty, the "legacy" RuntimeClass will be used,
/// which is an implicit class with an empty definition that uses the
/// default runtime handler. More info:
/// https://github.com/kubernetes/community/blob/master/keps/sig-node/0014-runtime-class.md
/// This is an alpha feature and may change in the future.
/// </summary>
[JsonProperty(PropertyName = "runtimeClassName")]
public string RuntimeClassName { get; set; }
/// <summary>
/// Gets or sets if specified, the pod will be dispatched by specified
/// scheduler. If not specified, the pod will be dispatched by default
@@ -403,8 +425,8 @@ namespace k8s.Models
/// view and signal processes from other containers in the same pod,
/// and the first process in each container will not be assigned PID 1.
/// HostPID and ShareProcessNamespace cannot both be set. Optional:
/// Default to false. This field is alpha-level and is honored only by
/// servers that enable the PodShareProcessNamespace feature.
/// Default to false. This field is beta-level and may be disabled with
/// the PodShareProcessNamespace feature.
/// </summary>
[JsonProperty(PropertyName = "shareProcessNamespace")]
public bool? ShareProcessNamespace { get; set; }

View File

@@ -37,7 +37,7 @@ namespace k8s.Models
/// in ScaleIO.</param>
/// <param name="fsType">Filesystem type to mount. Must be a filesystem
/// type supported by the host operating system. Ex. "ext4", "xfs",
/// "ntfs". Implicitly inferred to be "ext4" if unspecified.</param>
/// "ntfs". Default is "xfs"</param>
/// <param name="protectionDomain">The name of the ScaleIO Protection
/// Domain for the configured storage.</param>
/// <param name="readOnlyProperty">Defaults to false (read/write).
@@ -46,7 +46,8 @@ namespace k8s.Models
/// <param name="sslEnabled">Flag to enable/disable SSL communication
/// with Gateway, default false</param>
/// <param name="storageMode">Indicates whether the storage for a
/// volume should be ThickProvisioned or ThinProvisioned.</param>
/// volume should be ThickProvisioned or ThinProvisioned. Default is
/// ThinProvisioned.</param>
/// <param name="storagePool">The ScaleIO Storage Pool associated with
/// the protection domain.</param>
/// <param name="volumeName">The name of a volume already created in
@@ -75,7 +76,7 @@ namespace k8s.Models
/// <summary>
/// Gets or sets filesystem type to mount. Must be a filesystem type
/// supported by the host operating system. Ex. "ext4", "xfs", "ntfs".
/// Implicitly inferred to be "ext4" if unspecified.
/// Default is "xfs"
/// </summary>
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }
@@ -117,7 +118,7 @@ namespace k8s.Models
/// <summary>
/// Gets or sets indicates whether the storage for a volume should be
/// ThickProvisioned or ThinProvisioned.
/// ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
/// </summary>
[JsonProperty(PropertyName = "storageMode")]
public string StorageMode { get; set; }

View File

@@ -35,7 +35,7 @@ namespace k8s.Models
/// in ScaleIO.</param>
/// <param name="fsType">Filesystem type to mount. Must be a filesystem
/// type supported by the host operating system. Ex. "ext4", "xfs",
/// "ntfs". Implicitly inferred to be "ext4" if unspecified.</param>
/// "ntfs". Default is "xfs".</param>
/// <param name="protectionDomain">The name of the ScaleIO Protection
/// Domain for the configured storage.</param>
/// <param name="readOnlyProperty">Defaults to false (read/write).
@@ -44,7 +44,8 @@ namespace k8s.Models
/// <param name="sslEnabled">Flag to enable/disable SSL communication
/// with Gateway, default false</param>
/// <param name="storageMode">Indicates whether the storage for a
/// volume should be ThickProvisioned or ThinProvisioned.</param>
/// volume should be ThickProvisioned or ThinProvisioned. Default is
/// ThinProvisioned.</param>
/// <param name="storagePool">The ScaleIO Storage Pool associated with
/// the protection domain.</param>
/// <param name="volumeName">The name of a volume already created in
@@ -73,7 +74,7 @@ namespace k8s.Models
/// <summary>
/// Gets or sets filesystem type to mount. Must be a filesystem type
/// supported by the host operating system. Ex. "ext4", "xfs", "ntfs".
/// Implicitly inferred to be "ext4" if unspecified.
/// Default is "xfs".
/// </summary>
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }
@@ -115,7 +116,7 @@ namespace k8s.Models
/// <summary>
/// Gets or sets indicates whether the storage for a volume should be
/// ThickProvisioned or ThinProvisioned.
/// ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
/// </summary>
[JsonProperty(PropertyName = "storageMode")]
public string StorageMode { get; set; }

View File

@@ -40,6 +40,10 @@ namespace k8s.Models
/// <param name="privileged">Run container in privileged mode.
/// Processes in privileged containers are essentially equivalent to
/// root on the host. Defaults to false.</param>
/// <param name="procMount">procMount denotes the type of proc mount to
/// use for the containers. The default is DefaultProcMount which uses
/// the container runtime defaults for readonly paths and masked paths.
/// This requires the ProcMountType feature flag to be enabled.</param>
/// <param name="readOnlyRootFilesystem">Whether this container has a
/// read-only root filesystem. Default is false.</param>
/// <param name="runAsGroup">The GID to run the entrypoint of the
@@ -66,11 +70,12 @@ namespace k8s.Models
/// PodSecurityContext. If set in both SecurityContext and
/// PodSecurityContext, the value specified in SecurityContext takes
/// precedence.</param>
public V1SecurityContext(bool? allowPrivilegeEscalation = default(bool?), V1Capabilities capabilities = default(V1Capabilities), bool? privileged = default(bool?), bool? readOnlyRootFilesystem = default(bool?), long? runAsGroup = default(long?), bool? runAsNonRoot = default(bool?), long? runAsUser = default(long?), V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions))
public V1SecurityContext(bool? allowPrivilegeEscalation = default(bool?), V1Capabilities capabilities = default(V1Capabilities), bool? privileged = default(bool?), string procMount = default(string), bool? readOnlyRootFilesystem = default(bool?), long? runAsGroup = default(long?), bool? runAsNonRoot = default(bool?), long? runAsUser = default(long?), V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions))
{
AllowPrivilegeEscalation = allowPrivilegeEscalation;
Capabilities = capabilities;
Privileged = privileged;
ProcMount = procMount;
ReadOnlyRootFilesystem = readOnlyRootFilesystem;
RunAsGroup = runAsGroup;
RunAsNonRoot = runAsNonRoot;
@@ -110,6 +115,15 @@ namespace k8s.Models
[JsonProperty(PropertyName = "privileged")]
public bool? Privileged { get; set; }
/// <summary>
/// Gets or sets procMount denotes the type of proc mount to use for
/// the containers. The default is DefaultProcMount which uses the
/// container runtime defaults for readonly paths and masked paths.
/// This requires the ProcMountType feature flag to be enabled.
/// </summary>
[JsonProperty(PropertyName = "procMount")]
public string ProcMount { get; set; }
/// <summary>
/// Gets or sets whether this container has a read-only root
/// filesystem. Default is false.

View File

@@ -40,7 +40,7 @@ namespace k8s.Models
/// one. More info:
/// https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport</param>
/// <param name="protocol">The IP protocol for this port. Supports
/// "TCP" and "UDP". Default is TCP.</param>
/// "TCP", "UDP", and "SCTP". Default is TCP.</param>
/// <param name="targetPort">Number or name of the port to access on
/// the pods targeted by the service. Number must be in the range 1 to
/// 65535. Name must be an IANA_SVC_NAME. If this is a string, it will
@@ -92,8 +92,8 @@ namespace k8s.Models
public int Port { get; set; }
/// <summary>
/// Gets or sets the IP protocol for this port. Supports "TCP" and
/// "UDP". Default is TCP.
/// Gets or sets the IP protocol for this port. Supports "TCP", "UDP",
/// and "SCTP". Default is TCP.
/// </summary>
[JsonProperty(PropertyName = "protocol")]
public string Protocol { get; set; }

View File

@@ -40,8 +40,8 @@ namespace k8s.Models
/// volumes can be dynamically provisioned. Each volume plugin defines
/// its own supported topology specifications. An empty
/// TopologySelectorTerm list means there is no topology restriction.
/// This field is alpha-level and is only honored by servers that
/// enable the DynamicProvisioningScheduling feature.</param>
/// This field is only honored by servers that enable the
/// VolumeScheduling feature.</param>
/// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
@@ -66,9 +66,8 @@ namespace k8s.Models
/// reclaimPolicy. Defaults to Delete.</param>
/// <param name="volumeBindingMode">VolumeBindingMode indicates how
/// PersistentVolumeClaims should be provisioned and bound. When
/// unset, VolumeBindingImmediate is used. This field is alpha-level
/// and is only honored by servers that enable the VolumeScheduling
/// feature.</param>
/// unset, VolumeBindingImmediate is used. This field is only honored
/// by servers that enable the VolumeScheduling feature.</param>
public V1StorageClass(string provisioner, bool? allowVolumeExpansion = default(bool?), IList<V1TopologySelectorTerm> allowedTopologies = default(IList<V1TopologySelectorTerm>), string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), IList<string> mountOptions = default(IList<string>), IDictionary<string, string> parameters = default(IDictionary<string, string>), string reclaimPolicy = default(string), string volumeBindingMode = default(string))
{
AllowVolumeExpansion = allowVolumeExpansion;
@@ -100,9 +99,8 @@ namespace k8s.Models
/// Gets or sets restrict the node topologies where volumes can be
/// dynamically provisioned. Each volume plugin defines its own
/// supported topology specifications. An empty TopologySelectorTerm
/// list means there is no topology restriction. This field is
/// alpha-level and is only honored by servers that enable the
/// DynamicProvisioningScheduling feature.
/// list means there is no topology restriction. This field is only
/// honored by servers that enable the VolumeScheduling feature.
/// </summary>
[JsonProperty(PropertyName = "allowedTopologies")]
public IList<V1TopologySelectorTerm> AllowedTopologies { get; set; }
@@ -167,8 +165,8 @@ namespace k8s.Models
/// <summary>
/// Gets or sets volumeBindingMode indicates how PersistentVolumeClaims
/// should be provisioned and bound. When unset,
/// VolumeBindingImmediate is used. This field is alpha-level and is
/// only honored by servers that enable the VolumeScheduling feature.
/// VolumeBindingImmediate is used. This field is only honored by
/// servers that enable the VolumeScheduling feature.
/// </summary>
[JsonProperty(PropertyName = "volumeBindingMode")]
public string VolumeBindingMode { get; set; }

View File

@@ -0,0 +1,92 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// TypedLocalObjectReference contains enough information to let you locate
/// the typed referenced object inside the same namespace.
/// </summary>
public partial class V1TypedLocalObjectReference
{
/// <summary>
/// Initializes a new instance of the V1TypedLocalObjectReference
/// class.
/// </summary>
public V1TypedLocalObjectReference()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1TypedLocalObjectReference
/// class.
/// </summary>
/// <param name="kind">Kind is the type of resource being
/// referenced</param>
/// <param name="name">Name is the name of resource being
/// referenced</param>
/// <param name="apiGroup">APIGroup is the group for the resource being
/// referenced. If APIGroup is not specified, the specified Kind must
/// be in the core API group. For any other third-party types, APIGroup
/// is required.</param>
public V1TypedLocalObjectReference(string kind, string name, string apiGroup = default(string))
{
ApiGroup = apiGroup;
Kind = kind;
Name = name;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets aPIGroup is the group for the resource being
/// referenced. If APIGroup is not specified, the specified Kind must
/// be in the core API group. For any other third-party types, APIGroup
/// is required.
/// </summary>
[JsonProperty(PropertyName = "apiGroup")]
public string ApiGroup { get; set; }
/// <summary>
/// Gets or sets kind is the type of resource being referenced
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets name is the name of resource being referenced
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Kind == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Kind");
}
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
}
}
}

View File

@@ -31,8 +31,8 @@ namespace k8s.Models
/// <param name="name">This must match the Name of a Volume.</param>
/// <param name="mountPropagation">mountPropagation determines how
/// mounts are propagated from the host to container and the other way
/// around. When not set, MountPropagationHostToContainer is used. This
/// field is beta in 1.10.</param>
/// around. When not set, MountPropagationNone is used. This field is
/// beta in 1.10.</param>
/// <param name="readOnlyProperty">Mounted read-only if true,
/// read-write otherwise (false or unspecified). Defaults to
/// false.</param>
@@ -64,8 +64,7 @@ namespace k8s.Models
/// <summary>
/// Gets or sets mountPropagation determines how mounts are propagated
/// from the host to container and the other way around. When not set,
/// MountPropagationHostToContainer is used. This field is beta in
/// 1.10.
/// MountPropagationNone is used. This field is beta in 1.10.
/// </summary>
[JsonProperty(PropertyName = "mountPropagation")]
public string MountPropagation { get; set; }

View File

@@ -6,6 +6,7 @@
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -29,6 +30,8 @@ namespace k8s.Models
/// Initializes a new instance of the V1beta1CustomResourceDefinition
/// class.
/// </summary>
/// <param name="spec">Spec describes how the user wants the resources
/// to appear</param>
/// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
@@ -39,11 +42,9 @@ namespace k8s.Models
/// endpoint the client submits requests to. Cannot be updated. In
/// CamelCase. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="spec">Spec describes how the user wants the resources
/// to appear</param>
/// <param name="status">Status indicates the actual state of the
/// CustomResourceDefinition</param>
public V1beta1CustomResourceDefinition(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1CustomResourceDefinitionSpec spec = default(V1beta1CustomResourceDefinitionSpec), V1beta1CustomResourceDefinitionStatus status = default(V1beta1CustomResourceDefinitionStatus))
public V1beta1CustomResourceDefinition(V1beta1CustomResourceDefinitionSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1CustomResourceDefinitionStatus status = default(V1beta1CustomResourceDefinitionStatus))
{
ApiVersion = apiVersion;
Kind = kind;
@@ -100,11 +101,15 @@ namespace k8s.Models
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Spec == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Spec");
}
if (Metadata != null)
{
Metadata.Validate();

View File

@@ -0,0 +1,104 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Lease defines a lease concept.
/// </summary>
public partial class V1beta1Lease
{
/// <summary>
/// Initializes a new instance of the V1beta1Lease class.
/// </summary>
public V1beta1Lease()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1Lease class.
/// </summary>
/// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</param>
/// <param name="kind">Kind is a string value representing the REST
/// resource this object represents. Servers may infer this from the
/// endpoint the client submits requests to. Cannot be updated. In
/// CamelCase. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
/// <param name="spec">Specification of the Lease. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status</param>
public V1beta1Lease(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1LeaseSpec spec = default(V1beta1LeaseSpec))
{
ApiVersion = apiVersion;
Kind = kind;
Metadata = metadata;
Spec = spec;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets aPIVersion defines the versioned schema of this
/// representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets kind is a string value representing the REST resource
/// this object represents. Servers may infer this from the endpoint
/// the client submits requests to. Cannot be updated. In CamelCase.
/// More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets more info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets specification of the Lease. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
/// </summary>
[JsonProperty(PropertyName = "spec")]
public V1beta1LeaseSpec Spec { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Metadata != null)
{
Metadata.Validate();
}
}
}
}

View File

@@ -0,0 +1,115 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// LeaseList is a list of Lease objects.
/// </summary>
public partial class V1beta1LeaseList
{
/// <summary>
/// Initializes a new instance of the V1beta1LeaseList class.
/// </summary>
public V1beta1LeaseList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1LeaseList class.
/// </summary>
/// <param name="items">Items is a list of schema objects.</param>
/// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</param>
/// <param name="kind">Kind is a string value representing the REST
/// resource this object represents. Servers may infer this from the
/// endpoint the client submits requests to. Cannot be updated. In
/// CamelCase. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard list metadata. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
public V1beta1LeaseList(IList<V1beta1Lease> items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta))
{
ApiVersion = apiVersion;
Items = items;
Kind = kind;
Metadata = metadata;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets aPIVersion defines the versioned schema of this
/// representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets items is a list of schema objects.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1beta1Lease> Items { get; set; }
/// <summary>
/// Gets or sets kind is a string value representing the REST resource
/// this object represents. Servers may infer this from the endpoint
/// the client submits requests to. Cannot be updated. In CamelCase.
/// More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard list metadata. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ListMeta Metadata { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Items == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Items");
}
if (Items != null)
{
foreach (var element in Items)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,92 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// LeaseSpec is a specification of a Lease.
/// </summary>
public partial class V1beta1LeaseSpec
{
/// <summary>
/// Initializes a new instance of the V1beta1LeaseSpec class.
/// </summary>
public V1beta1LeaseSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1LeaseSpec class.
/// </summary>
/// <param name="acquireTime">acquireTime is a time when the current
/// lease was acquired.</param>
/// <param name="holderIdentity">holderIdentity contains the identity
/// of the holder of a current lease.</param>
/// <param name="leaseDurationSeconds">leaseDurationSeconds is a
/// duration that candidates for a lease need to wait to force acquire
/// it. This is measure against time of last observed
/// RenewTime.</param>
/// <param name="leaseTransitions">leaseTransitions is the number of
/// transitions of a lease between holders.</param>
/// <param name="renewTime">renewTime is a time when the current holder
/// of a lease has last updated the lease.</param>
public V1beta1LeaseSpec(System.DateTime? acquireTime = default(System.DateTime?), string holderIdentity = default(string), int? leaseDurationSeconds = default(int?), int? leaseTransitions = default(int?), System.DateTime? renewTime = default(System.DateTime?))
{
AcquireTime = acquireTime;
HolderIdentity = holderIdentity;
LeaseDurationSeconds = leaseDurationSeconds;
LeaseTransitions = leaseTransitions;
RenewTime = renewTime;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets acquireTime is a time when the current lease was
/// acquired.
/// </summary>
[JsonProperty(PropertyName = "acquireTime")]
public System.DateTime? AcquireTime { get; set; }
/// <summary>
/// Gets or sets holderIdentity contains the identity of the holder of
/// a current lease.
/// </summary>
[JsonProperty(PropertyName = "holderIdentity")]
public string HolderIdentity { get; set; }
/// <summary>
/// Gets or sets leaseDurationSeconds is a duration that candidates for
/// a lease need to wait to force acquire it. This is measure against
/// time of last observed RenewTime.
/// </summary>
[JsonProperty(PropertyName = "leaseDurationSeconds")]
public int? LeaseDurationSeconds { get; set; }
/// <summary>
/// Gets or sets leaseTransitions is the number of transitions of a
/// lease between holders.
/// </summary>
[JsonProperty(PropertyName = "leaseTransitions")]
public int? LeaseTransitions { get; set; }
/// <summary>
/// Gets or sets renewTime is a time when the current holder of a lease
/// has last updated the lease.
/// </summary>
[JsonProperty(PropertyName = "renewTime")]
public System.DateTime? RenewTime { get; set; }
}
}

View File

@@ -31,8 +31,8 @@ namespace k8s.Models
/// field is not provided, this matches all port names and numbers. If
/// present, only traffic on the specified protocol AND port will be
/// matched.</param>
/// <param name="protocol">Optional. The protocol (TCP or UDP) which
/// traffic must match. If not specified, this field defaults to
/// <param name="protocol">Optional. The protocol (TCP, UDP, or SCTP)
/// which traffic must match. If not specified, this field defaults to
/// TCP.</param>
public V1beta1NetworkPolicyPort(IntstrIntOrString port = default(IntstrIntOrString), string protocol = default(string))
{
@@ -56,8 +56,8 @@ namespace k8s.Models
public IntstrIntOrString Port { get; set; }
/// <summary>
/// Gets or sets optional. The protocol (TCP or UDP) which traffic
/// must match. If not specified, this field defaults to TCP.
/// Gets or sets optional. The protocol (TCP, UDP, or SCTP) which
/// traffic must match. If not specified, this field defaults to TCP.
/// </summary>
[JsonProperty(PropertyName = "protocol")]
public string Protocol { get; set; }

View File

@@ -6,7 +6,6 @@
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -34,6 +33,10 @@ namespace k8s.Models
/// <param name="currentHealthy">current number of healthy pods</param>
/// <param name="desiredHealthy">minimum desired number of healthy
/// pods</param>
/// <param name="disruptionsAllowed">Number of pod disruptions that are
/// currently allowed.</param>
/// <param name="expectedPods">total number of pods counted by this
/// disruption budget</param>
/// <param name="disruptedPods">DisruptedPods contains information
/// about pods whose eviction was processed by the API server eviction
/// subresource handler but has not yet been observed by the
@@ -48,15 +51,11 @@ namespace k8s.Models
/// smooth this map should be empty for the most of the time. Large
/// number of entries in the map may indicate problems with pod
/// deletions.</param>
/// <param name="disruptionsAllowed">Number of pod disruptions that are
/// currently allowed.</param>
/// <param name="expectedPods">total number of pods counted by this
/// disruption budget</param>
/// <param name="observedGeneration">Most recent generation observed
/// when updating this PDB status. PodDisruptionsAllowed and other
/// status informatio is valid only if observedGeneration equals to
/// PDB's object generation.</param>
public V1beta1PodDisruptionBudgetStatus(int currentHealthy, int desiredHealthy, IDictionary<string, System.DateTime?> disruptedPods, int disruptionsAllowed, int expectedPods, long? observedGeneration = default(long?))
public V1beta1PodDisruptionBudgetStatus(int currentHealthy, int desiredHealthy, int disruptionsAllowed, int expectedPods, IDictionary<string, System.DateTime?> disruptedPods = default(IDictionary<string, System.DateTime?>), long? observedGeneration = default(long?))
{
CurrentHealthy = currentHealthy;
DesiredHealthy = desiredHealthy;
@@ -125,15 +124,11 @@ namespace k8s.Models
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (DisruptedPods == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "DisruptedPods");
}
}
}
}

View File

@@ -40,8 +40,8 @@ namespace k8s.Models
/// volumes can be dynamically provisioned. Each volume plugin defines
/// its own supported topology specifications. An empty
/// TopologySelectorTerm list means there is no topology restriction.
/// This field is alpha-level and is only honored by servers that
/// enable the DynamicProvisioningScheduling feature.</param>
/// This field is only honored by servers that enable the
/// VolumeScheduling feature.</param>
/// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
@@ -66,9 +66,8 @@ namespace k8s.Models
/// reclaimPolicy. Defaults to Delete.</param>
/// <param name="volumeBindingMode">VolumeBindingMode indicates how
/// PersistentVolumeClaims should be provisioned and bound. When
/// unset, VolumeBindingImmediate is used. This field is alpha-level
/// and is only honored by servers that enable the VolumeScheduling
/// feature.</param>
/// unset, VolumeBindingImmediate is used. This field is only honored
/// by servers that enable the VolumeScheduling feature.</param>
public V1beta1StorageClass(string provisioner, bool? allowVolumeExpansion = default(bool?), IList<V1TopologySelectorTerm> allowedTopologies = default(IList<V1TopologySelectorTerm>), string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), IList<string> mountOptions = default(IList<string>), IDictionary<string, string> parameters = default(IDictionary<string, string>), string reclaimPolicy = default(string), string volumeBindingMode = default(string))
{
AllowVolumeExpansion = allowVolumeExpansion;
@@ -100,9 +99,8 @@ namespace k8s.Models
/// Gets or sets restrict the node topologies where volumes can be
/// dynamically provisioned. Each volume plugin defines its own
/// supported topology specifications. An empty TopologySelectorTerm
/// list means there is no topology restriction. This field is
/// alpha-level and is only honored by servers that enable the
/// DynamicProvisioningScheduling feature.
/// list means there is no topology restriction. This field is only
/// honored by servers that enable the VolumeScheduling feature.
/// </summary>
[JsonProperty(PropertyName = "allowedTopologies")]
public IList<V1TopologySelectorTerm> AllowedTopologies { get; set; }
@@ -167,8 +165,8 @@ namespace k8s.Models
/// <summary>
/// Gets or sets volumeBindingMode indicates how PersistentVolumeClaims
/// should be provisioned and bound. When unset,
/// VolumeBindingImmediate is used. This field is alpha-level and is
/// only honored by servers that enable the VolumeScheduling feature.
/// VolumeBindingImmediate is used. This field is only honored by
/// servers that enable the VolumeScheduling feature.
/// </summary>
[JsonProperty(PropertyName = "volumeBindingMode")]
public string VolumeBindingMode { get; set; }

View File

@@ -91,13 +91,22 @@ namespace k8s.Models
/// ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never
/// called on admission requests for ValidatingWebhookConfiguration and
/// MutatingWebhookConfiguration objects.</param>
public V1beta1Webhook(V1beta1WebhookClientConfig clientConfig, string name, string failurePolicy = default(string), V1LabelSelector namespaceSelector = default(V1LabelSelector), IList<V1beta1RuleWithOperations> rules = default(IList<V1beta1RuleWithOperations>))
/// <param name="sideEffects">SideEffects states whether this webhookk
/// has side effects. Acceptable values are: Unknown, None, Some,
/// NoneOnDryRun Webhooks with side effects MUST implement a
/// reconciliation system, since a request may be rejected by a future
/// step in the admission change and the side effects therefore need to
/// be undone. Requests with the dryRun attribute will be auto-rejected
/// if they match a webhook with sideEffects == Unknown or Some.
/// Defaults to Unknown.</param>
public V1beta1Webhook(V1beta1WebhookClientConfig clientConfig, string name, string failurePolicy = default(string), V1LabelSelector namespaceSelector = default(V1LabelSelector), IList<V1beta1RuleWithOperations> rules = default(IList<V1beta1RuleWithOperations>), string sideEffects = default(string))
{
ClientConfig = clientConfig;
FailurePolicy = failurePolicy;
Name = name;
NamespaceSelector = namespaceSelector;
Rules = rules;
SideEffects = sideEffects;
CustomInit();
}
@@ -191,6 +200,18 @@ namespace k8s.Models
[JsonProperty(PropertyName = "rules")]
public IList<V1beta1RuleWithOperations> Rules { get; set; }
/// <summary>
/// Gets or sets sideEffects states whether this webhookk has side
/// effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun
/// Webhooks with side effects MUST implement a reconciliation system,
/// since a request may be rejected by a future step in the admission
/// change and the side effects therefore need to be undone. Requests
/// with the dryRun attribute will be auto-rejected if they match a
/// webhook with sideEffects == Unknown or Some. Defaults to Unknown.
/// </summary>
[JsonProperty(PropertyName = "sideEffects")]
public string SideEffects { get; set; }
/// <summary>
/// Validate the object.
/// </summary>

View File

@@ -34,21 +34,21 @@ namespace k8s.Models
/// <param name="conditions">conditions is the set of conditions
/// required for this autoscaler to scale its target, and indicates
/// whether or not those conditions are met.</param>
/// <param name="currentMetrics">currentMetrics is the last read state
/// of the metrics used by this autoscaler.</param>
/// <param name="currentReplicas">currentReplicas is current number of
/// replicas of pods managed by this autoscaler, as last seen by the
/// autoscaler.</param>
/// <param name="desiredReplicas">desiredReplicas is the desired number
/// of replicas of pods managed by this autoscaler, as last calculated
/// by the autoscaler.</param>
/// <param name="currentMetrics">currentMetrics is the last read state
/// of the metrics used by this autoscaler.</param>
/// <param name="lastScaleTime">lastScaleTime is the last time the
/// HorizontalPodAutoscaler scaled the number of pods, used by the
/// autoscaler to control how often the number of pods is
/// changed.</param>
/// <param name="observedGeneration">observedGeneration is the most
/// recent generation observed by this autoscaler.</param>
public V2beta1HorizontalPodAutoscalerStatus(IList<V2beta1HorizontalPodAutoscalerCondition> conditions, IList<V2beta1MetricStatus> currentMetrics, int currentReplicas, int desiredReplicas, System.DateTime? lastScaleTime = default(System.DateTime?), long? observedGeneration = default(long?))
public V2beta1HorizontalPodAutoscalerStatus(IList<V2beta1HorizontalPodAutoscalerCondition> conditions, int currentReplicas, int desiredReplicas, IList<V2beta1MetricStatus> currentMetrics = default(IList<V2beta1MetricStatus>), System.DateTime? lastScaleTime = default(System.DateTime?), long? observedGeneration = default(long?))
{
Conditions = conditions;
CurrentMetrics = currentMetrics;
@@ -121,10 +121,6 @@ namespace k8s.Models
{
throw new ValidationException(ValidationRules.CannotBeNull, "Conditions");
}
if (CurrentMetrics == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "CurrentMetrics");
}
if (Conditions != null)
{
foreach (var element in Conditions)

View File

@@ -33,9 +33,19 @@ namespace k8s.Models
/// object.</param>
/// <param name="targetValue">targetValue is the target value of the
/// metric (as a quantity).</param>
public V2beta1ObjectMetricSource(string metricName, V2beta1CrossVersionObjectReference target, ResourceQuantity targetValue)
/// <param name="averageValue">averageValue is the target value of the
/// average of the metric across all relevant pods (as a
/// quantity)</param>
/// <param name="selector">selector is the string-encoded form of a
/// standard kubernetes label selector for the given metric When set,
/// it is passed as an additional parameter to the metrics server for
/// more specific metrics scoping When unset, just the metricName will
/// be used to gather metrics.</param>
public V2beta1ObjectMetricSource(string metricName, V2beta1CrossVersionObjectReference target, ResourceQuantity targetValue, ResourceQuantity averageValue = default(ResourceQuantity), V1LabelSelector selector = default(V1LabelSelector))
{
AverageValue = averageValue;
MetricName = metricName;
Selector = selector;
Target = target;
TargetValue = targetValue;
CustomInit();
@@ -46,12 +56,29 @@ namespace k8s.Models
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets averageValue is the target value of the average of the
/// metric across all relevant pods (as a quantity)
/// </summary>
[JsonProperty(PropertyName = "averageValue")]
public ResourceQuantity AverageValue { get; set; }
/// <summary>
/// Gets or sets metricName is the name of the metric in question.
/// </summary>
[JsonProperty(PropertyName = "metricName")]
public string MetricName { get; set; }
/// <summary>
/// Gets or sets selector is the string-encoded form of a standard
/// kubernetes label selector for the given metric When set, it is
/// passed as an additional parameter to the metrics server for more
/// specific metrics scoping When unset, just the metricName will be
/// used to gather metrics.
/// </summary>
[JsonProperty(PropertyName = "selector")]
public V1LabelSelector Selector { get; set; }
/// <summary>
/// Gets or sets target is the described Kubernetes object.
/// </summary>

View File

@@ -33,10 +33,20 @@ namespace k8s.Models
/// question.</param>
/// <param name="target">target is the described Kubernetes
/// object.</param>
public V2beta1ObjectMetricStatus(ResourceQuantity currentValue, string metricName, V2beta1CrossVersionObjectReference target)
/// <param name="averageValue">averageValue is the current value of the
/// average of the metric across all relevant pods (as a
/// quantity)</param>
/// <param name="selector">selector is the string-encoded form of a
/// standard kubernetes label selector for the given metric When set in
/// the ObjectMetricSource, it is passed as an additional parameter to
/// the metrics server for more specific metrics scoping. When unset,
/// just the metricName will be used to gather metrics.</param>
public V2beta1ObjectMetricStatus(ResourceQuantity currentValue, string metricName, V2beta1CrossVersionObjectReference target, ResourceQuantity averageValue = default(ResourceQuantity), V1LabelSelector selector = default(V1LabelSelector))
{
AverageValue = averageValue;
CurrentValue = currentValue;
MetricName = metricName;
Selector = selector;
Target = target;
CustomInit();
}
@@ -46,6 +56,13 @@ namespace k8s.Models
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets averageValue is the current value of the average of
/// the metric across all relevant pods (as a quantity)
/// </summary>
[JsonProperty(PropertyName = "averageValue")]
public ResourceQuantity AverageValue { get; set; }
/// <summary>
/// Gets or sets currentValue is the current value of the metric (as a
/// quantity).
@@ -59,6 +76,16 @@ namespace k8s.Models
[JsonProperty(PropertyName = "metricName")]
public string MetricName { get; set; }
/// <summary>
/// Gets or sets selector is the string-encoded form of a standard
/// kubernetes label selector for the given metric When set in the
/// ObjectMetricSource, it is passed as an additional parameter to the
/// metrics server for more specific metrics scoping. When unset, just
/// the metricName will be used to gather metrics.
/// </summary>
[JsonProperty(PropertyName = "selector")]
public V1LabelSelector Selector { get; set; }
/// <summary>
/// Gets or sets target is the described Kubernetes object.
/// </summary>

View File

@@ -34,9 +34,15 @@ namespace k8s.Models
/// <param name="targetAverageValue">targetAverageValue is the target
/// value of the average of the metric across all relevant pods (as a
/// quantity)</param>
public V2beta1PodsMetricSource(string metricName, ResourceQuantity targetAverageValue)
/// <param name="selector">selector is the string-encoded form of a
/// standard kubernetes label selector for the given metric When set,
/// it is passed as an additional parameter to the metrics server for
/// more specific metrics scoping When unset, just the metricName will
/// be used to gather metrics.</param>
public V2beta1PodsMetricSource(string metricName, ResourceQuantity targetAverageValue, V1LabelSelector selector = default(V1LabelSelector))
{
MetricName = metricName;
Selector = selector;
TargetAverageValue = targetAverageValue;
CustomInit();
}
@@ -52,6 +58,16 @@ namespace k8s.Models
[JsonProperty(PropertyName = "metricName")]
public string MetricName { get; set; }
/// <summary>
/// Gets or sets selector is the string-encoded form of a standard
/// kubernetes label selector for the given metric When set, it is
/// passed as an additional parameter to the metrics server for more
/// specific metrics scoping When unset, just the metricName will be
/// used to gather metrics.
/// </summary>
[JsonProperty(PropertyName = "selector")]
public V1LabelSelector Selector { get; set; }
/// <summary>
/// Gets or sets targetAverageValue is the target value of the average
/// of the metric across all relevant pods (as a quantity)

View File

@@ -33,10 +33,16 @@ namespace k8s.Models
/// (as a quantity)</param>
/// <param name="metricName">metricName is the name of the metric in
/// question</param>
public V2beta1PodsMetricStatus(ResourceQuantity currentAverageValue, string metricName)
/// <param name="selector">selector is the string-encoded form of a
/// standard kubernetes label selector for the given metric When set in
/// the PodsMetricSource, it is passed as an additional parameter to
/// the metrics server for more specific metrics scoping. When unset,
/// just the metricName will be used to gather metrics.</param>
public V2beta1PodsMetricStatus(ResourceQuantity currentAverageValue, string metricName, V1LabelSelector selector = default(V1LabelSelector))
{
CurrentAverageValue = currentAverageValue;
MetricName = metricName;
Selector = selector;
CustomInit();
}
@@ -58,6 +64,16 @@ namespace k8s.Models
[JsonProperty(PropertyName = "metricName")]
public string MetricName { get; set; }
/// <summary>
/// Gets or sets selector is the string-encoded form of a standard
/// kubernetes label selector for the given metric When set in the
/// PodsMetricSource, it is passed as an additional parameter to the
/// metrics server for more specific metrics scoping. When unset, just
/// the metricName will be used to gather metrics.
/// </summary>
[JsonProperty(PropertyName = "selector")]
public V1LabelSelector Selector { get; set; }
/// <summary>
/// Validate the object.
/// </summary>

View File

@@ -0,0 +1,88 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// CrossVersionObjectReference contains enough information to let you
/// identify the referred resource.
/// </summary>
public partial class V2beta2CrossVersionObjectReference
{
/// <summary>
/// Initializes a new instance of the
/// V2beta2CrossVersionObjectReference class.
/// </summary>
public V2beta2CrossVersionObjectReference()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// V2beta2CrossVersionObjectReference class.
/// </summary>
/// <param name="kind">Kind of the referent; More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"</param>
/// <param name="name">Name of the referent; More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names</param>
/// <param name="apiVersion">API version of the referent</param>
public V2beta2CrossVersionObjectReference(string kind, string name, string apiVersion = default(string))
{
ApiVersion = apiVersion;
Kind = kind;
Name = name;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets API version of the referent
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets kind of the referent; More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets name of the referent; More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Kind == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Kind");
}
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
}
}
}

View File

@@ -0,0 +1,89 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ExternalMetricSource indicates how to scale on a metric not associated
/// with any Kubernetes object (for example length of queue in cloud
/// messaging service, or QPS from loadbalancer running outside of
/// cluster).
/// </summary>
public partial class V2beta2ExternalMetricSource
{
/// <summary>
/// Initializes a new instance of the V2beta2ExternalMetricSource
/// class.
/// </summary>
public V2beta2ExternalMetricSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2ExternalMetricSource
/// class.
/// </summary>
/// <param name="metric">metric identifies the target metric by name
/// and selector</param>
/// <param name="target">target specifies the target value for the
/// given metric</param>
public V2beta2ExternalMetricSource(V2beta2MetricIdentifier metric, V2beta2MetricTarget target)
{
Metric = metric;
Target = target;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets metric identifies the target metric by name and
/// selector
/// </summary>
[JsonProperty(PropertyName = "metric")]
public V2beta2MetricIdentifier Metric { get; set; }
/// <summary>
/// Gets or sets target specifies the target value for the given metric
/// </summary>
[JsonProperty(PropertyName = "target")]
public V2beta2MetricTarget Target { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Metric == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Metric");
}
if (Target == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Target");
}
if (Metric != null)
{
Metric.Validate();
}
if (Target != null)
{
Target.Validate();
}
}
}
}

View File

@@ -0,0 +1,84 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ExternalMetricStatus indicates the current value of a global metric not
/// associated with any Kubernetes object.
/// </summary>
public partial class V2beta2ExternalMetricStatus
{
/// <summary>
/// Initializes a new instance of the V2beta2ExternalMetricStatus
/// class.
/// </summary>
public V2beta2ExternalMetricStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2ExternalMetricStatus
/// class.
/// </summary>
/// <param name="current">current contains the current value for the
/// given metric</param>
/// <param name="metric">metric identifies the target metric by name
/// and selector</param>
public V2beta2ExternalMetricStatus(V2beta2MetricValueStatus current, V2beta2MetricIdentifier metric)
{
Current = current;
Metric = metric;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets current contains the current value for the given
/// metric
/// </summary>
[JsonProperty(PropertyName = "current")]
public V2beta2MetricValueStatus Current { get; set; }
/// <summary>
/// Gets or sets metric identifies the target metric by name and
/// selector
/// </summary>
[JsonProperty(PropertyName = "metric")]
public V2beta2MetricIdentifier Metric { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Current == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Current");
}
if (Metric == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Metric");
}
if (Metric != null)
{
Metric.Validate();
}
}
}
}

View File

@@ -0,0 +1,130 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// HorizontalPodAutoscaler is the configuration for a horizontal pod
/// autoscaler, which automatically manages the replica count of any
/// resource implementing the scale subresource based on the metrics
/// specified.
/// </summary>
public partial class V2beta2HorizontalPodAutoscaler
{
/// <summary>
/// Initializes a new instance of the V2beta2HorizontalPodAutoscaler
/// class.
/// </summary>
public V2beta2HorizontalPodAutoscaler()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2HorizontalPodAutoscaler
/// class.
/// </summary>
/// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</param>
/// <param name="kind">Kind is a string value representing the REST
/// resource this object represents. Servers may infer this from the
/// endpoint the client submits requests to. Cannot be updated. In
/// CamelCase. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">metadata is the standard object metadata.
/// More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
/// <param name="spec">spec is the specification for the behaviour of
/// the autoscaler. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.</param>
/// <param name="status">status is the current information about the
/// autoscaler.</param>
public V2beta2HorizontalPodAutoscaler(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V2beta2HorizontalPodAutoscalerSpec spec = default(V2beta2HorizontalPodAutoscalerSpec), V2beta2HorizontalPodAutoscalerStatus status = default(V2beta2HorizontalPodAutoscalerStatus))
{
ApiVersion = apiVersion;
Kind = kind;
Metadata = metadata;
Spec = spec;
Status = status;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets aPIVersion defines the versioned schema of this
/// representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets kind is a string value representing the REST resource
/// this object represents. Servers may infer this from the endpoint
/// the client submits requests to. Cannot be updated. In CamelCase.
/// More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets metadata is the standard object metadata. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets spec is the specification for the behaviour of the
/// autoscaler. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
/// </summary>
[JsonProperty(PropertyName = "spec")]
public V2beta2HorizontalPodAutoscalerSpec Spec { get; set; }
/// <summary>
/// Gets or sets status is the current information about the
/// autoscaler.
/// </summary>
[JsonProperty(PropertyName = "status")]
public V2beta2HorizontalPodAutoscalerStatus Status { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Metadata != null)
{
Metadata.Validate();
}
if (Spec != null)
{
Spec.Validate();
}
if (Status != null)
{
Status.Validate();
}
}
}
}

View File

@@ -0,0 +1,108 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// HorizontalPodAutoscalerCondition describes the state of a
/// HorizontalPodAutoscaler at a certain point.
/// </summary>
public partial class V2beta2HorizontalPodAutoscalerCondition
{
/// <summary>
/// Initializes a new instance of the
/// V2beta2HorizontalPodAutoscalerCondition class.
/// </summary>
public V2beta2HorizontalPodAutoscalerCondition()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// V2beta2HorizontalPodAutoscalerCondition class.
/// </summary>
/// <param name="status">status is the status of the condition (True,
/// False, Unknown)</param>
/// <param name="type">type describes the current condition</param>
/// <param name="lastTransitionTime">lastTransitionTime is the last
/// time the condition transitioned from one status to another</param>
/// <param name="message">message is a human-readable explanation
/// containing details about the transition</param>
/// <param name="reason">reason is the reason for the condition's last
/// transition.</param>
public V2beta2HorizontalPodAutoscalerCondition(string status, string type, System.DateTime? lastTransitionTime = default(System.DateTime?), string message = default(string), string reason = default(string))
{
LastTransitionTime = lastTransitionTime;
Message = message;
Reason = reason;
Status = status;
Type = type;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets lastTransitionTime is the last time the condition
/// transitioned from one status to another
/// </summary>
[JsonProperty(PropertyName = "lastTransitionTime")]
public System.DateTime? LastTransitionTime { get; set; }
/// <summary>
/// Gets or sets message is a human-readable explanation containing
/// details about the transition
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets reason is the reason for the condition's last
/// transition.
/// </summary>
[JsonProperty(PropertyName = "reason")]
public string Reason { get; set; }
/// <summary>
/// Gets or sets status is the status of the condition (True, False,
/// Unknown)
/// </summary>
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
/// <summary>
/// Gets or sets type describes the current condition
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Status == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Status");
}
if (Type == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Type");
}
}
}
}

View File

@@ -0,0 +1,119 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// HorizontalPodAutoscalerList is a list of horizontal pod autoscaler
/// objects.
/// </summary>
public partial class V2beta2HorizontalPodAutoscalerList
{
/// <summary>
/// Initializes a new instance of the
/// V2beta2HorizontalPodAutoscalerList class.
/// </summary>
public V2beta2HorizontalPodAutoscalerList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// V2beta2HorizontalPodAutoscalerList class.
/// </summary>
/// <param name="items">items is the list of horizontal pod autoscaler
/// objects.</param>
/// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</param>
/// <param name="kind">Kind is a string value representing the REST
/// resource this object represents. Servers may infer this from the
/// endpoint the client submits requests to. Cannot be updated. In
/// CamelCase. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">metadata is the standard list
/// metadata.</param>
public V2beta2HorizontalPodAutoscalerList(IList<V2beta2HorizontalPodAutoscaler> items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta))
{
ApiVersion = apiVersion;
Items = items;
Kind = kind;
Metadata = metadata;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets aPIVersion defines the versioned schema of this
/// representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets items is the list of horizontal pod autoscaler
/// objects.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V2beta2HorizontalPodAutoscaler> Items { get; set; }
/// <summary>
/// Gets or sets kind is a string value representing the REST resource
/// this object represents. Servers may infer this from the endpoint
/// the client submits requests to. Cannot be updated. In CamelCase.
/// More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets metadata is the standard list metadata.
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ListMeta Metadata { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Items == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Items");
}
if (Items != null)
{
foreach (var element in Items)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,133 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// HorizontalPodAutoscalerSpec describes the desired functionality of the
/// HorizontalPodAutoscaler.
/// </summary>
public partial class V2beta2HorizontalPodAutoscalerSpec
{
/// <summary>
/// Initializes a new instance of the
/// V2beta2HorizontalPodAutoscalerSpec class.
/// </summary>
public V2beta2HorizontalPodAutoscalerSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// V2beta2HorizontalPodAutoscalerSpec class.
/// </summary>
/// <param name="maxReplicas">maxReplicas is the upper limit for the
/// number of replicas to which the autoscaler can scale up. It cannot
/// be less that minReplicas.</param>
/// <param name="scaleTargetRef">scaleTargetRef points to the target
/// resource to scale, and is used to the pods for which metrics should
/// be collected, as well as to actually change the replica
/// count.</param>
/// <param name="metrics">metrics contains the specifications for which
/// to use to calculate the desired replica count (the maximum replica
/// count across all metrics will be used). The desired replica count
/// is calculated multiplying the ratio between the target value and
/// the current value by the current number of pods. Ergo, metrics
/// used must decrease as the pod count is increased, and vice-versa.
/// See the individual metric source types for more information about
/// how each type of metric must respond. If not set, the default
/// metric will be set to 80% average CPU utilization.</param>
/// <param name="minReplicas">minReplicas is the lower limit for the
/// number of replicas to which the autoscaler can scale down. It
/// defaults to 1 pod.</param>
public V2beta2HorizontalPodAutoscalerSpec(int maxReplicas, V2beta2CrossVersionObjectReference scaleTargetRef, IList<V2beta2MetricSpec> metrics = default(IList<V2beta2MetricSpec>), int? minReplicas = default(int?))
{
MaxReplicas = maxReplicas;
Metrics = metrics;
MinReplicas = minReplicas;
ScaleTargetRef = scaleTargetRef;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets maxReplicas is the upper limit for the number of
/// replicas to which the autoscaler can scale up. It cannot be less
/// that minReplicas.
/// </summary>
[JsonProperty(PropertyName = "maxReplicas")]
public int MaxReplicas { get; set; }
/// <summary>
/// Gets or sets metrics contains the specifications for which to use
/// to calculate the desired replica count (the maximum replica count
/// across all metrics will be used). The desired replica count is
/// calculated multiplying the ratio between the target value and the
/// current value by the current number of pods. Ergo, metrics used
/// must decrease as the pod count is increased, and vice-versa. See
/// the individual metric source types for more information about how
/// each type of metric must respond. If not set, the default metric
/// will be set to 80% average CPU utilization.
/// </summary>
[JsonProperty(PropertyName = "metrics")]
public IList<V2beta2MetricSpec> Metrics { get; set; }
/// <summary>
/// Gets or sets minReplicas is the lower limit for the number of
/// replicas to which the autoscaler can scale down. It defaults to 1
/// pod.
/// </summary>
[JsonProperty(PropertyName = "minReplicas")]
public int? MinReplicas { get; set; }
/// <summary>
/// Gets or sets scaleTargetRef points to the target resource to scale,
/// and is used to the pods for which metrics should be collected, as
/// well as to actually change the replica count.
/// </summary>
[JsonProperty(PropertyName = "scaleTargetRef")]
public V2beta2CrossVersionObjectReference ScaleTargetRef { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (ScaleTargetRef == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ScaleTargetRef");
}
if (Metrics != null)
{
foreach (var element in Metrics)
{
if (element != null)
{
element.Validate();
}
}
}
if (ScaleTargetRef != null)
{
ScaleTargetRef.Validate();
}
}
}
}

View File

@@ -0,0 +1,146 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// HorizontalPodAutoscalerStatus describes the current status of a
/// horizontal pod autoscaler.
/// </summary>
public partial class V2beta2HorizontalPodAutoscalerStatus
{
/// <summary>
/// Initializes a new instance of the
/// V2beta2HorizontalPodAutoscalerStatus class.
/// </summary>
public V2beta2HorizontalPodAutoscalerStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// V2beta2HorizontalPodAutoscalerStatus class.
/// </summary>
/// <param name="conditions">conditions is the set of conditions
/// required for this autoscaler to scale its target, and indicates
/// whether or not those conditions are met.</param>
/// <param name="currentReplicas">currentReplicas is current number of
/// replicas of pods managed by this autoscaler, as last seen by the
/// autoscaler.</param>
/// <param name="desiredReplicas">desiredReplicas is the desired number
/// of replicas of pods managed by this autoscaler, as last calculated
/// by the autoscaler.</param>
/// <param name="currentMetrics">currentMetrics is the last read state
/// of the metrics used by this autoscaler.</param>
/// <param name="lastScaleTime">lastScaleTime is the last time the
/// HorizontalPodAutoscaler scaled the number of pods, used by the
/// autoscaler to control how often the number of pods is
/// changed.</param>
/// <param name="observedGeneration">observedGeneration is the most
/// recent generation observed by this autoscaler.</param>
public V2beta2HorizontalPodAutoscalerStatus(IList<V2beta2HorizontalPodAutoscalerCondition> conditions, int currentReplicas, int desiredReplicas, IList<V2beta2MetricStatus> currentMetrics = default(IList<V2beta2MetricStatus>), System.DateTime? lastScaleTime = default(System.DateTime?), long? observedGeneration = default(long?))
{
Conditions = conditions;
CurrentMetrics = currentMetrics;
CurrentReplicas = currentReplicas;
DesiredReplicas = desiredReplicas;
LastScaleTime = lastScaleTime;
ObservedGeneration = observedGeneration;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets conditions is the set of conditions required for this
/// autoscaler to scale its target, and indicates whether or not those
/// conditions are met.
/// </summary>
[JsonProperty(PropertyName = "conditions")]
public IList<V2beta2HorizontalPodAutoscalerCondition> Conditions { get; set; }
/// <summary>
/// Gets or sets currentMetrics is the last read state of the metrics
/// used by this autoscaler.
/// </summary>
[JsonProperty(PropertyName = "currentMetrics")]
public IList<V2beta2MetricStatus> CurrentMetrics { get; set; }
/// <summary>
/// Gets or sets currentReplicas is current number of replicas of pods
/// managed by this autoscaler, as last seen by the autoscaler.
/// </summary>
[JsonProperty(PropertyName = "currentReplicas")]
public int CurrentReplicas { get; set; }
/// <summary>
/// Gets or sets desiredReplicas is the desired number of replicas of
/// pods managed by this autoscaler, as last calculated by the
/// autoscaler.
/// </summary>
[JsonProperty(PropertyName = "desiredReplicas")]
public int DesiredReplicas { get; set; }
/// <summary>
/// Gets or sets lastScaleTime is the last time the
/// HorizontalPodAutoscaler scaled the number of pods, used by the
/// autoscaler to control how often the number of pods is changed.
/// </summary>
[JsonProperty(PropertyName = "lastScaleTime")]
public System.DateTime? LastScaleTime { get; set; }
/// <summary>
/// Gets or sets observedGeneration is the most recent generation
/// observed by this autoscaler.
/// </summary>
[JsonProperty(PropertyName = "observedGeneration")]
public long? ObservedGeneration { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Conditions == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Conditions");
}
if (Conditions != null)
{
foreach (var element in Conditions)
{
if (element != null)
{
element.Validate();
}
}
}
if (CurrentMetrics != null)
{
foreach (var element1 in CurrentMetrics)
{
if (element1 != null)
{
element1.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,77 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// MetricIdentifier defines the name and optionally selector for a metric
/// </summary>
public partial class V2beta2MetricIdentifier
{
/// <summary>
/// Initializes a new instance of the V2beta2MetricIdentifier class.
/// </summary>
public V2beta2MetricIdentifier()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2MetricIdentifier class.
/// </summary>
/// <param name="name">name is the name of the given metric</param>
/// <param name="selector">selector is the string-encoded form of a
/// standard kubernetes label selector for the given metric When set,
/// it is passed as an additional parameter to the metrics server for
/// more specific metrics scoping. When unset, just the metricName will
/// be used to gather metrics.</param>
public V2beta2MetricIdentifier(string name, V1LabelSelector selector = default(V1LabelSelector))
{
Name = name;
Selector = selector;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets name is the name of the given metric
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets selector is the string-encoded form of a standard
/// kubernetes label selector for the given metric When set, it is
/// passed as an additional parameter to the metrics server for more
/// specific metrics scoping. When unset, just the metricName will be
/// used to gather metrics.
/// </summary>
[JsonProperty(PropertyName = "selector")]
public V1LabelSelector Selector { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
}
}
}

View File

@@ -0,0 +1,142 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// MetricSpec specifies how to scale based on a single metric (only `type`
/// and one other matching field should be set at once).
/// </summary>
public partial class V2beta2MetricSpec
{
/// <summary>
/// Initializes a new instance of the V2beta2MetricSpec class.
/// </summary>
public V2beta2MetricSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2MetricSpec class.
/// </summary>
/// <param name="type">type is the type of metric source. It should be
/// one of "Object", "Pods" or "Resource", each mapping to a matching
/// field in the object.</param>
/// <param name="external">external refers to a global metric that is
/// not associated with any Kubernetes object. It allows autoscaling
/// based on information coming from components running outside of
/// cluster (for example length of queue in cloud messaging service, or
/// QPS from loadbalancer running outside of cluster).</param>
/// <param name="objectProperty">object refers to a metric describing a
/// single kubernetes object (for example, hits-per-second on an
/// Ingress object).</param>
/// <param name="pods">pods refers to a metric describing each pod in
/// the current scale target (for example,
/// transactions-processed-per-second). The values will be averaged
/// together before being compared to the target value.</param>
/// <param name="resource">resource refers to a resource metric (such
/// as those specified in requests and limits) known to Kubernetes
/// describing each pod in the current scale target (e.g. CPU or
/// memory). Such metrics are built in to Kubernetes, and have special
/// scaling options on top of those available to normal per-pod metrics
/// using the "pods" source.</param>
public V2beta2MetricSpec(string type, V2beta2ExternalMetricSource external = default(V2beta2ExternalMetricSource), V2beta2ObjectMetricSource objectProperty = default(V2beta2ObjectMetricSource), V2beta2PodsMetricSource pods = default(V2beta2PodsMetricSource), V2beta2ResourceMetricSource resource = default(V2beta2ResourceMetricSource))
{
External = external;
ObjectProperty = objectProperty;
Pods = pods;
Resource = resource;
Type = type;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets external refers to a global metric that is not
/// associated with any Kubernetes object. It allows autoscaling based
/// on information coming from components running outside of cluster
/// (for example length of queue in cloud messaging service, or QPS
/// from loadbalancer running outside of cluster).
/// </summary>
[JsonProperty(PropertyName = "external")]
public V2beta2ExternalMetricSource External { get; set; }
/// <summary>
/// Gets or sets object refers to a metric describing a single
/// kubernetes object (for example, hits-per-second on an Ingress
/// object).
/// </summary>
[JsonProperty(PropertyName = "object")]
public V2beta2ObjectMetricSource ObjectProperty { get; set; }
/// <summary>
/// Gets or sets pods refers to a metric describing each pod in the
/// current scale target (for example,
/// transactions-processed-per-second). The values will be averaged
/// together before being compared to the target value.
/// </summary>
[JsonProperty(PropertyName = "pods")]
public V2beta2PodsMetricSource Pods { get; set; }
/// <summary>
/// Gets or sets resource refers to a resource metric (such as those
/// specified in requests and limits) known to Kubernetes describing
/// each pod in the current scale target (e.g. CPU or memory). Such
/// metrics are built in to Kubernetes, and have special scaling
/// options on top of those available to normal per-pod metrics using
/// the "pods" source.
/// </summary>
[JsonProperty(PropertyName = "resource")]
public V2beta2ResourceMetricSource Resource { get; set; }
/// <summary>
/// Gets or sets type is the type of metric source. It should be one
/// of "Object", "Pods" or "Resource", each mapping to a matching field
/// in the object.
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Type == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Type");
}
if (External != null)
{
External.Validate();
}
if (ObjectProperty != null)
{
ObjectProperty.Validate();
}
if (Pods != null)
{
Pods.Validate();
}
if (Resource != null)
{
Resource.Validate();
}
}
}
}

View File

@@ -0,0 +1,141 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// MetricStatus describes the last-read state of a single metric.
/// </summary>
public partial class V2beta2MetricStatus
{
/// <summary>
/// Initializes a new instance of the V2beta2MetricStatus class.
/// </summary>
public V2beta2MetricStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2MetricStatus class.
/// </summary>
/// <param name="type">type is the type of metric source. It will be
/// one of "Object", "Pods" or "Resource", each corresponds to a
/// matching field in the object.</param>
/// <param name="external">external refers to a global metric that is
/// not associated with any Kubernetes object. It allows autoscaling
/// based on information coming from components running outside of
/// cluster (for example length of queue in cloud messaging service, or
/// QPS from loadbalancer running outside of cluster).</param>
/// <param name="objectProperty">object refers to a metric describing a
/// single kubernetes object (for example, hits-per-second on an
/// Ingress object).</param>
/// <param name="pods">pods refers to a metric describing each pod in
/// the current scale target (for example,
/// transactions-processed-per-second). The values will be averaged
/// together before being compared to the target value.</param>
/// <param name="resource">resource refers to a resource metric (such
/// as those specified in requests and limits) known to Kubernetes
/// describing each pod in the current scale target (e.g. CPU or
/// memory). Such metrics are built in to Kubernetes, and have special
/// scaling options on top of those available to normal per-pod metrics
/// using the "pods" source.</param>
public V2beta2MetricStatus(string type, V2beta2ExternalMetricStatus external = default(V2beta2ExternalMetricStatus), V2beta2ObjectMetricStatus objectProperty = default(V2beta2ObjectMetricStatus), V2beta2PodsMetricStatus pods = default(V2beta2PodsMetricStatus), V2beta2ResourceMetricStatus resource = default(V2beta2ResourceMetricStatus))
{
External = external;
ObjectProperty = objectProperty;
Pods = pods;
Resource = resource;
Type = type;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets external refers to a global metric that is not
/// associated with any Kubernetes object. It allows autoscaling based
/// on information coming from components running outside of cluster
/// (for example length of queue in cloud messaging service, or QPS
/// from loadbalancer running outside of cluster).
/// </summary>
[JsonProperty(PropertyName = "external")]
public V2beta2ExternalMetricStatus External { get; set; }
/// <summary>
/// Gets or sets object refers to a metric describing a single
/// kubernetes object (for example, hits-per-second on an Ingress
/// object).
/// </summary>
[JsonProperty(PropertyName = "object")]
public V2beta2ObjectMetricStatus ObjectProperty { get; set; }
/// <summary>
/// Gets or sets pods refers to a metric describing each pod in the
/// current scale target (for example,
/// transactions-processed-per-second). The values will be averaged
/// together before being compared to the target value.
/// </summary>
[JsonProperty(PropertyName = "pods")]
public V2beta2PodsMetricStatus Pods { get; set; }
/// <summary>
/// Gets or sets resource refers to a resource metric (such as those
/// specified in requests and limits) known to Kubernetes describing
/// each pod in the current scale target (e.g. CPU or memory). Such
/// metrics are built in to Kubernetes, and have special scaling
/// options on top of those available to normal per-pod metrics using
/// the "pods" source.
/// </summary>
[JsonProperty(PropertyName = "resource")]
public V2beta2ResourceMetricStatus Resource { get; set; }
/// <summary>
/// Gets or sets type is the type of metric source. It will be one of
/// "Object", "Pods" or "Resource", each corresponds to a matching
/// field in the object.
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Type == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Type");
}
if (External != null)
{
External.Validate();
}
if (ObjectProperty != null)
{
ObjectProperty.Validate();
}
if (Pods != null)
{
Pods.Validate();
}
if (Resource != null)
{
Resource.Validate();
}
}
}
}

View File

@@ -0,0 +1,100 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// MetricTarget defines the target value, average value, or average
/// utilization of a specific metric
/// </summary>
public partial class V2beta2MetricTarget
{
/// <summary>
/// Initializes a new instance of the V2beta2MetricTarget class.
/// </summary>
public V2beta2MetricTarget()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2MetricTarget class.
/// </summary>
/// <param name="type">type represents whether the metric type is
/// Utilization, Value, or AverageValue</param>
/// <param name="averageUtilization">averageUtilization is the target
/// value of the average of the resource metric across all relevant
/// pods, represented as a percentage of the requested value of the
/// resource for the pods. Currently only valid for Resource metric
/// source type</param>
/// <param name="averageValue">averageValue is the target value of the
/// average of the metric across all relevant pods (as a
/// quantity)</param>
/// <param name="value">value is the target value of the metric (as a
/// quantity).</param>
public V2beta2MetricTarget(string type, int? averageUtilization = default(int?), ResourceQuantity averageValue = default(ResourceQuantity), ResourceQuantity value = default(ResourceQuantity))
{
AverageUtilization = averageUtilization;
AverageValue = averageValue;
Type = type;
Value = value;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets averageUtilization is the target value of the average
/// of the resource metric across all relevant pods, represented as a
/// percentage of the requested value of the resource for the pods.
/// Currently only valid for Resource metric source type
/// </summary>
[JsonProperty(PropertyName = "averageUtilization")]
public int? AverageUtilization { get; set; }
/// <summary>
/// Gets or sets averageValue is the target value of the average of the
/// metric across all relevant pods (as a quantity)
/// </summary>
[JsonProperty(PropertyName = "averageValue")]
public ResourceQuantity AverageValue { get; set; }
/// <summary>
/// Gets or sets type represents whether the metric type is
/// Utilization, Value, or AverageValue
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
/// <summary>
/// Gets or sets value is the target value of the metric (as a
/// quantity).
/// </summary>
[JsonProperty(PropertyName = "value")]
public ResourceQuantity Value { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Type == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Type");
}
}
}
}

View File

@@ -0,0 +1,74 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// MetricValueStatus holds the current value for a metric
/// </summary>
public partial class V2beta2MetricValueStatus
{
/// <summary>
/// Initializes a new instance of the V2beta2MetricValueStatus class.
/// </summary>
public V2beta2MetricValueStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2MetricValueStatus class.
/// </summary>
/// <param name="averageUtilization">currentAverageUtilization is the
/// current value of the average of the resource metric across all
/// relevant pods, represented as a percentage of the requested value
/// of the resource for the pods.</param>
/// <param name="averageValue">averageValue is the current value of the
/// average of the metric across all relevant pods (as a
/// quantity)</param>
/// <param name="value">value is the current value of the metric (as a
/// quantity).</param>
public V2beta2MetricValueStatus(int? averageUtilization = default(int?), ResourceQuantity averageValue = default(ResourceQuantity), ResourceQuantity value = default(ResourceQuantity))
{
AverageUtilization = averageUtilization;
AverageValue = averageValue;
Value = value;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets currentAverageUtilization is the current value of the
/// average of the resource metric across all relevant pods,
/// represented as a percentage of the requested value of the resource
/// for the pods.
/// </summary>
[JsonProperty(PropertyName = "averageUtilization")]
public int? AverageUtilization { get; set; }
/// <summary>
/// Gets or sets averageValue is the current value of the average of
/// the metric across all relevant pods (as a quantity)
/// </summary>
[JsonProperty(PropertyName = "averageValue")]
public ResourceQuantity AverageValue { get; set; }
/// <summary>
/// Gets or sets value is the current value of the metric (as a
/// quantity).
/// </summary>
[JsonProperty(PropertyName = "value")]
public ResourceQuantity Value { get; set; }
}
}

View File

@@ -0,0 +1,99 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ObjectMetricSource indicates how to scale on a metric describing a
/// kubernetes object (for example, hits-per-second on an Ingress object).
/// </summary>
public partial class V2beta2ObjectMetricSource
{
/// <summary>
/// Initializes a new instance of the V2beta2ObjectMetricSource class.
/// </summary>
public V2beta2ObjectMetricSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2ObjectMetricSource class.
/// </summary>
/// <param name="metric">metric identifies the target metric by name
/// and selector</param>
/// <param name="target">target specifies the target value for the
/// given metric</param>
public V2beta2ObjectMetricSource(V2beta2CrossVersionObjectReference describedObject, V2beta2MetricIdentifier metric, V2beta2MetricTarget target)
{
DescribedObject = describedObject;
Metric = metric;
Target = target;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// </summary>
[JsonProperty(PropertyName = "describedObject")]
public V2beta2CrossVersionObjectReference DescribedObject { get; set; }
/// <summary>
/// Gets or sets metric identifies the target metric by name and
/// selector
/// </summary>
[JsonProperty(PropertyName = "metric")]
public V2beta2MetricIdentifier Metric { get; set; }
/// <summary>
/// Gets or sets target specifies the target value for the given metric
/// </summary>
[JsonProperty(PropertyName = "target")]
public V2beta2MetricTarget Target { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (DescribedObject == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "DescribedObject");
}
if (Metric == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Metric");
}
if (Target == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Target");
}
if (DescribedObject != null)
{
DescribedObject.Validate();
}
if (Metric != null)
{
Metric.Validate();
}
if (Target != null)
{
Target.Validate();
}
}
}
}

View File

@@ -0,0 +1,96 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ObjectMetricStatus indicates the current value of a metric describing a
/// kubernetes object (for example, hits-per-second on an Ingress object).
/// </summary>
public partial class V2beta2ObjectMetricStatus
{
/// <summary>
/// Initializes a new instance of the V2beta2ObjectMetricStatus class.
/// </summary>
public V2beta2ObjectMetricStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2ObjectMetricStatus class.
/// </summary>
/// <param name="current">current contains the current value for the
/// given metric</param>
/// <param name="metric">metric identifies the target metric by name
/// and selector</param>
public V2beta2ObjectMetricStatus(V2beta2MetricValueStatus current, V2beta2CrossVersionObjectReference describedObject, V2beta2MetricIdentifier metric)
{
Current = current;
DescribedObject = describedObject;
Metric = metric;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets current contains the current value for the given
/// metric
/// </summary>
[JsonProperty(PropertyName = "current")]
public V2beta2MetricValueStatus Current { get; set; }
/// <summary>
/// </summary>
[JsonProperty(PropertyName = "describedObject")]
public V2beta2CrossVersionObjectReference DescribedObject { get; set; }
/// <summary>
/// Gets or sets metric identifies the target metric by name and
/// selector
/// </summary>
[JsonProperty(PropertyName = "metric")]
public V2beta2MetricIdentifier Metric { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Current == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Current");
}
if (DescribedObject == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "DescribedObject");
}
if (Metric == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Metric");
}
if (DescribedObject != null)
{
DescribedObject.Validate();
}
if (Metric != null)
{
Metric.Validate();
}
}
}
}

View File

@@ -0,0 +1,87 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// PodsMetricSource indicates how to scale on a metric describing each pod
/// in the current scale target (for example,
/// transactions-processed-per-second). The values will be averaged
/// together before being compared to the target value.
/// </summary>
public partial class V2beta2PodsMetricSource
{
/// <summary>
/// Initializes a new instance of the V2beta2PodsMetricSource class.
/// </summary>
public V2beta2PodsMetricSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2PodsMetricSource class.
/// </summary>
/// <param name="metric">metric identifies the target metric by name
/// and selector</param>
/// <param name="target">target specifies the target value for the
/// given metric</param>
public V2beta2PodsMetricSource(V2beta2MetricIdentifier metric, V2beta2MetricTarget target)
{
Metric = metric;
Target = target;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets metric identifies the target metric by name and
/// selector
/// </summary>
[JsonProperty(PropertyName = "metric")]
public V2beta2MetricIdentifier Metric { get; set; }
/// <summary>
/// Gets or sets target specifies the target value for the given metric
/// </summary>
[JsonProperty(PropertyName = "target")]
public V2beta2MetricTarget Target { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Metric == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Metric");
}
if (Target == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Target");
}
if (Metric != null)
{
Metric.Validate();
}
if (Target != null)
{
Target.Validate();
}
}
}
}

View File

@@ -0,0 +1,83 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// PodsMetricStatus indicates the current value of a metric describing
/// each pod in the current scale target (for example,
/// transactions-processed-per-second).
/// </summary>
public partial class V2beta2PodsMetricStatus
{
/// <summary>
/// Initializes a new instance of the V2beta2PodsMetricStatus class.
/// </summary>
public V2beta2PodsMetricStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2PodsMetricStatus class.
/// </summary>
/// <param name="current">current contains the current value for the
/// given metric</param>
/// <param name="metric">metric identifies the target metric by name
/// and selector</param>
public V2beta2PodsMetricStatus(V2beta2MetricValueStatus current, V2beta2MetricIdentifier metric)
{
Current = current;
Metric = metric;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets current contains the current value for the given
/// metric
/// </summary>
[JsonProperty(PropertyName = "current")]
public V2beta2MetricValueStatus Current { get; set; }
/// <summary>
/// Gets or sets metric identifies the target metric by name and
/// selector
/// </summary>
[JsonProperty(PropertyName = "metric")]
public V2beta2MetricIdentifier Metric { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Current == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Current");
}
if (Metric == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Metric");
}
if (Metric != null)
{
Metric.Validate();
}
}
}
}

View File

@@ -0,0 +1,87 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ResourceMetricSource indicates how to scale on a resource metric known
/// to Kubernetes, as specified in requests and limits, describing each pod
/// in the current scale target (e.g. CPU or memory). The values will be
/// averaged together before being compared to the target. Such metrics
/// are built in to Kubernetes, and have special scaling options on top of
/// those available to normal per-pod metrics using the "pods" source.
/// Only one "target" type should be set.
/// </summary>
public partial class V2beta2ResourceMetricSource
{
/// <summary>
/// Initializes a new instance of the V2beta2ResourceMetricSource
/// class.
/// </summary>
public V2beta2ResourceMetricSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2ResourceMetricSource
/// class.
/// </summary>
/// <param name="name">name is the name of the resource in
/// question.</param>
/// <param name="target">target specifies the target value for the
/// given metric</param>
public V2beta2ResourceMetricSource(string name, V2beta2MetricTarget target)
{
Name = name;
Target = target;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets name is the name of the resource in question.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets target specifies the target value for the given metric
/// </summary>
[JsonProperty(PropertyName = "target")]
public V2beta2MetricTarget Target { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (Target == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Target");
}
if (Target != null)
{
Target.Validate();
}
}
}
}

View File

@@ -0,0 +1,83 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ResourceMetricStatus indicates the current value of a resource metric
/// known to Kubernetes, as specified in requests and limits, describing
/// each pod in the current scale target (e.g. CPU or memory). Such
/// metrics are built in to Kubernetes, and have special scaling options on
/// top of those available to normal per-pod metrics using the "pods"
/// source.
/// </summary>
public partial class V2beta2ResourceMetricStatus
{
/// <summary>
/// Initializes a new instance of the V2beta2ResourceMetricStatus
/// class.
/// </summary>
public V2beta2ResourceMetricStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta2ResourceMetricStatus
/// class.
/// </summary>
/// <param name="current">current contains the current value for the
/// given metric</param>
/// <param name="name">Name is the name of the resource in
/// question.</param>
public V2beta2ResourceMetricStatus(V2beta2MetricValueStatus current, string name)
{
Current = current;
Name = name;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets current contains the current value for the given
/// metric
/// </summary>
[JsonProperty(PropertyName = "current")]
public V2beta2MetricValueStatus Current { get; set; }
/// <summary>
/// Gets or sets name is the name of the resource in question.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Current == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Current");
}
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.2",
"version": "1.3",
"publicReleaseRefSpec": [
"^refs/heads/master$", // we release out of master
],