generate v1.10.0 client (#121)

This commit is contained in:
Boshi Lian
2018-03-28 10:30:09 +08:00
committed by Brendan Burns
parent c489e066d6
commit e91d2be9fd
67 changed files with 20207 additions and 12603 deletions

View File

@@ -1,3 +1,3 @@
export KUBERNETES_BRANCH=v1.9.2 export KUBERNETES_BRANCH=v1.10.0
export CLIENT_VERSION=0.0.1 export CLIENT_VERSION=0.0.1
export PACKAGE_NAME=k8s export PACKAGE_NAME=k8s

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
// <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>
/// AllowedFlexVolume represents a single Flexvolume that is allowed to be
/// used.
/// </summary>
public partial class Extensionsv1beta1AllowedFlexVolume
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1AllowedFlexVolume class.
/// </summary>
public Extensionsv1beta1AllowedFlexVolume()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1AllowedFlexVolume class.
/// </summary>
/// <param name="driver">Driver is the name of the Flexvolume
/// driver.</param>
public Extensionsv1beta1AllowedFlexVolume(string driver)
{
Driver = driver;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets driver is the name of the Flexvolume driver.
/// </summary>
[JsonProperty(PropertyName = "driver")]
public string Driver { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Driver == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Driver");
}
}
}
}

View File

@@ -0,0 +1,60 @@
// <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>
/// defines the host volume conditions that will be enabled by a policy for
/// pods to use. It requires the path prefix to be defined.
/// </summary>
public partial class Extensionsv1beta1AllowedHostPath
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1AllowedHostPath
/// class.
/// </summary>
public Extensionsv1beta1AllowedHostPath()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1AllowedHostPath
/// class.
/// </summary>
/// <param name="pathPrefix">is the path prefix that the host volume
/// must match. It does not support `*`. Trailing slashes are trimmed
/// when validating the path prefix with a host path.
///
/// Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo`
/// would not allow `/food` or `/etc/foo`</param>
public Extensionsv1beta1AllowedHostPath(string pathPrefix = default(string))
{
PathPrefix = pathPrefix;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets is the path prefix that the host volume must match. It
/// does not support `*`. Trailing slashes are trimmed when validating
/// the path prefix with a host path.
///
/// Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo`
/// would not allow `/food` or `/etc/foo`
/// </summary>
[JsonProperty(PropertyName = "pathPrefix")]
public string PathPrefix { get; set; }
}
}

View File

@@ -0,0 +1,66 @@
// <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.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// FSGroupStrategyOptions defines the strategy type and options used to
/// create the strategy.
/// </summary>
public partial class Extensionsv1beta1FSGroupStrategyOptions
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1FSGroupStrategyOptions class.
/// </summary>
public Extensionsv1beta1FSGroupStrategyOptions()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1FSGroupStrategyOptions class.
/// </summary>
/// <param name="ranges">Ranges are the allowed ranges of fs groups.
/// If you would like to force a single fs group then supply a single
/// range with the same start and end.</param>
/// <param name="rule">Rule is the strategy that will dictate what
/// FSGroup is used in the SecurityContext.</param>
public Extensionsv1beta1FSGroupStrategyOptions(IList<Extensionsv1beta1IDRange> ranges = default(IList<Extensionsv1beta1IDRange>), string rule = default(string))
{
Ranges = ranges;
Rule = rule;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets ranges are the allowed ranges of fs groups. If you
/// would like to force a single fs group then supply a single range
/// with the same start and end.
/// </summary>
[JsonProperty(PropertyName = "ranges")]
public IList<Extensionsv1beta1IDRange> Ranges { get; set; }
/// <summary>
/// Gets or sets rule is the strategy that will dictate what FSGroup is
/// used in the SecurityContext.
/// </summary>
[JsonProperty(PropertyName = "rule")]
public string Rule { get; set; }
}
}

View File

@@ -0,0 +1,69 @@
// <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>
/// Host Port Range defines a range of host ports that will be enabled by a
/// policy for pods to use. It requires both the start and end to be
/// defined.
/// </summary>
public partial class Extensionsv1beta1HostPortRange
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1HostPortRange
/// class.
/// </summary>
public Extensionsv1beta1HostPortRange()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1HostPortRange
/// class.
/// </summary>
/// <param name="max">max is the end of the range, inclusive.</param>
/// <param name="min">min is the start of the range, inclusive.</param>
public Extensionsv1beta1HostPortRange(int max, int min)
{
Max = max;
Min = min;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets max is the end of the range, inclusive.
/// </summary>
[JsonProperty(PropertyName = "max")]
public int Max { get; set; }
/// <summary>
/// Gets or sets min is the start of the range, inclusive.
/// </summary>
[JsonProperty(PropertyName = "min")]
public int Min { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
//Nothing to validate
}
}
}

View File

@@ -0,0 +1,65 @@
// <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>
/// ID Range provides a min/max of an allowed range of IDs.
/// </summary>
public partial class Extensionsv1beta1IDRange
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1IDRange class.
/// </summary>
public Extensionsv1beta1IDRange()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1IDRange class.
/// </summary>
/// <param name="max">Max is the end of the range, inclusive.</param>
/// <param name="min">Min is the start of the range, inclusive.</param>
public Extensionsv1beta1IDRange(long max, long min)
{
Max = max;
Min = min;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets max is the end of the range, inclusive.
/// </summary>
[JsonProperty(PropertyName = "max")]
public long Max { get; set; }
/// <summary>
/// Gets or sets min is the start of the range, inclusive.
/// </summary>
[JsonProperty(PropertyName = "min")]
public long Min { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
//Nothing to validate
}
}
}

View File

@@ -0,0 +1,109 @@
// <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>
/// Pod Security Policy governs the ability to make requests that affect
/// the Security Context that will be applied to a pod and container.
/// </summary>
public partial class Extensionsv1beta1PodSecurityPolicy
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1PodSecurityPolicy class.
/// </summary>
public Extensionsv1beta1PodSecurityPolicy()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1PodSecurityPolicy 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">Standard object's metadata. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
/// <param name="spec">spec defines the policy enforced.</param>
public Extensionsv1beta1PodSecurityPolicy(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Extensionsv1beta1PodSecurityPolicySpec spec = default(Extensionsv1beta1PodSecurityPolicySpec))
{
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 standard object's 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 defines the policy enforced.
/// </summary>
[JsonProperty(PropertyName = "spec")]
public Extensionsv1beta1PodSecurityPolicySpec 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();
}
if (Spec != null)
{
Spec.Validate();
}
}
}
}

View File

@@ -0,0 +1,117 @@
// <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>
/// Pod Security Policy List is a list of PodSecurityPolicy objects.
/// </summary>
public partial class Extensionsv1beta1PodSecurityPolicyList
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1PodSecurityPolicyList class.
/// </summary>
public Extensionsv1beta1PodSecurityPolicyList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1PodSecurityPolicyList 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 Extensionsv1beta1PodSecurityPolicyList(IList<Extensionsv1beta1PodSecurityPolicy> 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<Extensionsv1beta1PodSecurityPolicy> 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,312 @@
// <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>
/// Pod Security Policy Spec defines the policy enforced.
/// </summary>
public partial class Extensionsv1beta1PodSecurityPolicySpec
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1PodSecurityPolicySpec class.
/// </summary>
public Extensionsv1beta1PodSecurityPolicySpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1PodSecurityPolicySpec class.
/// </summary>
/// <param name="fsGroup">FSGroup is the strategy that will dictate
/// what fs group is used by the SecurityContext.</param>
/// <param name="runAsUser">runAsUser is the strategy that will dictate
/// the allowable RunAsUser values that may be set.</param>
/// <param name="seLinux">seLinux is the strategy that will dictate the
/// allowable labels that may be set.</param>
/// <param name="supplementalGroups">SupplementalGroups is the strategy
/// that will dictate what supplemental groups are used by the
/// SecurityContext.</param>
/// <param name="allowPrivilegeEscalation">AllowPrivilegeEscalation
/// determines if a pod can request to allow privilege escalation. If
/// unspecified, defaults to true.</param>
/// <param name="allowedCapabilities">AllowedCapabilities is a list of
/// capabilities that can be requested to add to the container.
/// Capabilities in this field may be added at the pod author's
/// discretion. You must not list a capability in both
/// AllowedCapabilities and RequiredDropCapabilities.</param>
/// <param name="allowedFlexVolumes">AllowedFlexVolumes is a whitelist
/// of allowed Flexvolumes. Empty or nil indicates that all
/// Flexvolumes may be used. This parameter is effective only when the
/// usage of the Flexvolumes is allowed in the "Volumes" field.</param>
/// <param name="allowedHostPaths">is a white list of allowed host
/// paths. Empty indicates that all host paths may be used.</param>
/// <param name="defaultAddCapabilities">DefaultAddCapabilities is the
/// default set of capabilities that will be added to the container
/// unless the pod spec specifically drops the capability. You may not
/// list a capability in both DefaultAddCapabilities and
/// RequiredDropCapabilities. Capabilities added here are implicitly
/// allowed, and need not be included in the AllowedCapabilities
/// list.</param>
/// <param
/// name="defaultAllowPrivilegeEscalation">DefaultAllowPrivilegeEscalation
/// controls the default setting for whether a process can gain more
/// privileges than its parent process.</param>
/// <param name="hostIPC">hostIPC determines if the policy allows the
/// use of HostIPC in the pod spec.</param>
/// <param name="hostNetwork">hostNetwork determines if the policy
/// allows the use of HostNetwork in the pod spec.</param>
/// <param name="hostPID">hostPID determines if the policy allows the
/// use of HostPID in the pod spec.</param>
/// <param name="hostPorts">hostPorts determines which host port ranges
/// are allowed to be exposed.</param>
/// <param name="privileged">privileged determines if a pod can request
/// to be run as privileged.</param>
/// <param name="readOnlyRootFilesystem">ReadOnlyRootFilesystem when
/// set to true will force containers to run with a read only root file
/// system. If the container specifically requests to run with a
/// non-read only root file system the PSP should deny the pod. If set
/// to false the container may run with a read only root file system if
/// it wishes but it will not be forced to.</param>
/// <param name="requiredDropCapabilities">RequiredDropCapabilities are
/// the capabilities that will be dropped from the container. These
/// are required to be dropped and cannot be added.</param>
/// <param name="volumes">volumes is a white list of allowed volume
/// plugins. Empty indicates that all plugins may be used.</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> defaultAddCapabilities = default(IList<string>), bool? defaultAllowPrivilegeEscalation = default(bool?), 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;
DefaultAddCapabilities = defaultAddCapabilities;
DefaultAllowPrivilegeEscalation = defaultAllowPrivilegeEscalation;
FsGroup = fsGroup;
HostIPC = hostIPC;
HostNetwork = hostNetwork;
HostPID = hostPID;
HostPorts = hostPorts;
Privileged = privileged;
ReadOnlyRootFilesystem = readOnlyRootFilesystem;
RequiredDropCapabilities = requiredDropCapabilities;
RunAsUser = runAsUser;
SeLinux = seLinux;
SupplementalGroups = supplementalGroups;
Volumes = volumes;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets allowPrivilegeEscalation determines if a pod can
/// request to allow privilege escalation. If unspecified, defaults to
/// true.
/// </summary>
[JsonProperty(PropertyName = "allowPrivilegeEscalation")]
public bool? AllowPrivilegeEscalation { get; set; }
/// <summary>
/// Gets or sets allowedCapabilities is a list of capabilities that can
/// be requested to add to the container. Capabilities in this field
/// may be added at the pod author's discretion. You must not list a
/// capability in both AllowedCapabilities and
/// RequiredDropCapabilities.
/// </summary>
[JsonProperty(PropertyName = "allowedCapabilities")]
public IList<string> AllowedCapabilities { get; set; }
/// <summary>
/// Gets or sets allowedFlexVolumes is a whitelist of allowed
/// Flexvolumes. Empty or nil indicates that all Flexvolumes may be
/// used. This parameter is effective only when the usage of the
/// Flexvolumes is allowed in the "Volumes" field.
/// </summary>
[JsonProperty(PropertyName = "allowedFlexVolumes")]
public IList<Extensionsv1beta1AllowedFlexVolume> AllowedFlexVolumes { get; set; }
/// <summary>
/// Gets or sets is a white list of allowed host paths. Empty indicates
/// that all host paths may be used.
/// </summary>
[JsonProperty(PropertyName = "allowedHostPaths")]
public IList<Extensionsv1beta1AllowedHostPath> AllowedHostPaths { get; set; }
/// <summary>
/// Gets or sets defaultAddCapabilities is the default set of
/// capabilities that will be added to the container unless the pod
/// spec specifically drops the capability. You may not list a
/// capability in both DefaultAddCapabilities and
/// RequiredDropCapabilities. Capabilities added here are implicitly
/// allowed, and need not be included in the AllowedCapabilities list.
/// </summary>
[JsonProperty(PropertyName = "defaultAddCapabilities")]
public IList<string> DefaultAddCapabilities { get; set; }
/// <summary>
/// Gets or sets defaultAllowPrivilegeEscalation controls the default
/// setting for whether a process can gain more privileges than its
/// parent process.
/// </summary>
[JsonProperty(PropertyName = "defaultAllowPrivilegeEscalation")]
public bool? DefaultAllowPrivilegeEscalation { get; set; }
/// <summary>
/// Gets or sets fSGroup is the strategy that will dictate what fs
/// group is used by the SecurityContext.
/// </summary>
[JsonProperty(PropertyName = "fsGroup")]
public Extensionsv1beta1FSGroupStrategyOptions FsGroup { get; set; }
/// <summary>
/// Gets or sets hostIPC determines if the policy allows the use of
/// HostIPC in the pod spec.
/// </summary>
[JsonProperty(PropertyName = "hostIPC")]
public bool? HostIPC { get; set; }
/// <summary>
/// Gets or sets hostNetwork determines if the policy allows the use of
/// HostNetwork in the pod spec.
/// </summary>
[JsonProperty(PropertyName = "hostNetwork")]
public bool? HostNetwork { get; set; }
/// <summary>
/// Gets or sets hostPID determines if the policy allows the use of
/// HostPID in the pod spec.
/// </summary>
[JsonProperty(PropertyName = "hostPID")]
public bool? HostPID { get; set; }
/// <summary>
/// Gets or sets hostPorts determines which host port ranges are
/// allowed to be exposed.
/// </summary>
[JsonProperty(PropertyName = "hostPorts")]
public IList<Extensionsv1beta1HostPortRange> HostPorts { get; set; }
/// <summary>
/// Gets or sets privileged determines if a pod can request to be run
/// as privileged.
/// </summary>
[JsonProperty(PropertyName = "privileged")]
public bool? Privileged { get; set; }
/// <summary>
/// Gets or sets readOnlyRootFilesystem when set to true will force
/// containers to run with a read only root file system. If the
/// container specifically requests to run with a non-read only root
/// file system the PSP should deny the pod. If set to false the
/// container may run with a read only root file system if it wishes
/// but it will not be forced to.
/// </summary>
[JsonProperty(PropertyName = "readOnlyRootFilesystem")]
public bool? ReadOnlyRootFilesystem { get; set; }
/// <summary>
/// Gets or sets requiredDropCapabilities are the capabilities that
/// will be dropped from the container. These are required to be
/// dropped and cannot be added.
/// </summary>
[JsonProperty(PropertyName = "requiredDropCapabilities")]
public IList<string> RequiredDropCapabilities { get; set; }
/// <summary>
/// Gets or sets runAsUser is the strategy that will dictate the
/// allowable RunAsUser values that may be set.
/// </summary>
[JsonProperty(PropertyName = "runAsUser")]
public Extensionsv1beta1RunAsUserStrategyOptions RunAsUser { get; set; }
/// <summary>
/// Gets or sets seLinux is the strategy that will dictate the
/// allowable labels that may be set.
/// </summary>
[JsonProperty(PropertyName = "seLinux")]
public Extensionsv1beta1SELinuxStrategyOptions SeLinux { get; set; }
/// <summary>
/// Gets or sets supplementalGroups is the strategy that will dictate
/// what supplemental groups are used by the SecurityContext.
/// </summary>
[JsonProperty(PropertyName = "supplementalGroups")]
public Extensionsv1beta1SupplementalGroupsStrategyOptions SupplementalGroups { get; set; }
/// <summary>
/// Gets or sets volumes is a white list of allowed volume plugins.
/// Empty indicates that all plugins may be used.
/// </summary>
[JsonProperty(PropertyName = "volumes")]
public IList<string> Volumes { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (FsGroup == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "FsGroup");
}
if (RunAsUser == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "RunAsUser");
}
if (SeLinux == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "SeLinux");
}
if (SupplementalGroups == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "SupplementalGroups");
}
if (AllowedFlexVolumes != null)
{
foreach (var element in AllowedFlexVolumes)
{
if (element != null)
{
element.Validate();
}
}
}
if (HostPorts != null)
{
foreach (var element1 in HostPorts)
{
if (element1 != null)
{
element1.Validate();
}
}
}
if (RunAsUser != null)
{
RunAsUser.Validate();
}
if (SeLinux != null)
{
SeLinux.Validate();
}
}
}
}

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.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Run A sUser Strategy Options defines the strategy type and any options
/// used to create the strategy.
/// </summary>
public partial class Extensionsv1beta1RunAsUserStrategyOptions
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1RunAsUserStrategyOptions class.
/// </summary>
public Extensionsv1beta1RunAsUserStrategyOptions()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1RunAsUserStrategyOptions class.
/// </summary>
/// <param name="rule">Rule is the strategy that will dictate the
/// allowable RunAsUser values that may be set.</param>
/// <param name="ranges">Ranges are the allowed ranges of uids that may
/// be used.</param>
public Extensionsv1beta1RunAsUserStrategyOptions(string rule, IList<Extensionsv1beta1IDRange> ranges = default(IList<Extensionsv1beta1IDRange>))
{
Ranges = ranges;
Rule = rule;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets ranges are the allowed ranges of uids that may be
/// used.
/// </summary>
[JsonProperty(PropertyName = "ranges")]
public IList<Extensionsv1beta1IDRange> Ranges { get; set; }
/// <summary>
/// Gets or sets rule is the strategy that will dictate the allowable
/// RunAsUser values that may be set.
/// </summary>
[JsonProperty(PropertyName = "rule")]
public string Rule { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Rule == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Rule");
}
if (Ranges != null)
{
foreach (var element in Ranges)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,78 @@
// <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>
/// SELinux Strategy Options defines the strategy type and any options
/// used to create the strategy.
/// </summary>
public partial class Extensionsv1beta1SELinuxStrategyOptions
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1SELinuxStrategyOptions class.
/// </summary>
public Extensionsv1beta1SELinuxStrategyOptions()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1SELinuxStrategyOptions class.
/// </summary>
/// <param name="rule">type is the strategy that will dictate the
/// allowable labels that may be set.</param>
/// <param name="seLinuxOptions">seLinuxOptions required to run as;
/// required for MustRunAs More info:
/// https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</param>
public Extensionsv1beta1SELinuxStrategyOptions(string rule, V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions))
{
Rule = rule;
SeLinuxOptions = seLinuxOptions;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets type is the strategy that will dictate the allowable
/// labels that may be set.
/// </summary>
[JsonProperty(PropertyName = "rule")]
public string Rule { get; set; }
/// <summary>
/// Gets or sets seLinuxOptions required to run as; required for
/// MustRunAs More info:
/// https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
/// </summary>
[JsonProperty(PropertyName = "seLinuxOptions")]
public V1SELinuxOptions SeLinuxOptions { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Rule == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Rule");
}
}
}
}

View File

@@ -0,0 +1,66 @@
// <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.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// SupplementalGroupsStrategyOptions defines the strategy type and options
/// used to create the strategy.
/// </summary>
public partial class Extensionsv1beta1SupplementalGroupsStrategyOptions
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1SupplementalGroupsStrategyOptions class.
/// </summary>
public Extensionsv1beta1SupplementalGroupsStrategyOptions()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1SupplementalGroupsStrategyOptions class.
/// </summary>
/// <param name="ranges">Ranges are the allowed ranges of supplemental
/// groups. If you would like to force a single supplemental group
/// then supply a single range with the same start and end.</param>
/// <param name="rule">Rule is the strategy that will dictate what
/// supplemental groups is used in the SecurityContext.</param>
public Extensionsv1beta1SupplementalGroupsStrategyOptions(IList<Extensionsv1beta1IDRange> ranges = default(IList<Extensionsv1beta1IDRange>), string rule = default(string))
{
Ranges = ranges;
Rule = rule;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets ranges are the allowed ranges of supplemental groups.
/// If you would like to force a single supplemental group then supply
/// a single range with the same start and end.
/// </summary>
[JsonProperty(PropertyName = "ranges")]
public IList<Extensionsv1beta1IDRange> Ranges { get; set; }
/// <summary>
/// Gets or sets rule is the strategy that will dictate what
/// supplemental groups is used in the SecurityContext.
/// </summary>
[JsonProperty(PropertyName = "rule")]
public string Rule { get; set; }
}
}

View File

@@ -14,22 +14,24 @@ namespace k8s.Models
/// AllowedFlexVolume represents a single Flexvolume that is allowed to be /// AllowedFlexVolume represents a single Flexvolume that is allowed to be
/// used. /// used.
/// </summary> /// </summary>
public partial class V1beta1AllowedFlexVolume public partial class Policyv1beta1AllowedFlexVolume
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1AllowedFlexVolume class. /// Initializes a new instance of the Policyv1beta1AllowedFlexVolume
/// class.
/// </summary> /// </summary>
public V1beta1AllowedFlexVolume() public Policyv1beta1AllowedFlexVolume()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1AllowedFlexVolume class. /// Initializes a new instance of the Policyv1beta1AllowedFlexVolume
/// class.
/// </summary> /// </summary>
/// <param name="driver">Driver is the name of the Flexvolume /// <param name="driver">Driver is the name of the Flexvolume
/// driver.</param> /// driver.</param>
public V1beta1AllowedFlexVolume(string driver) public Policyv1beta1AllowedFlexVolume(string driver)
{ {
Driver = driver; Driver = driver;
CustomInit(); CustomInit();

View File

@@ -13,18 +13,20 @@ namespace k8s.Models
/// defines the host volume conditions that will be enabled by a policy for /// defines the host volume conditions that will be enabled by a policy for
/// pods to use. It requires the path prefix to be defined. /// pods to use. It requires the path prefix to be defined.
/// </summary> /// </summary>
public partial class V1beta1AllowedHostPath public partial class Policyv1beta1AllowedHostPath
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1AllowedHostPath class. /// Initializes a new instance of the Policyv1beta1AllowedHostPath
/// class.
/// </summary> /// </summary>
public V1beta1AllowedHostPath() public Policyv1beta1AllowedHostPath()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1AllowedHostPath class. /// Initializes a new instance of the Policyv1beta1AllowedHostPath
/// class.
/// </summary> /// </summary>
/// <param name="pathPrefix">is the path prefix that the host volume /// <param name="pathPrefix">is the path prefix that the host volume
/// must match. It does not support `*`. Trailing slashes are trimmed /// must match. It does not support `*`. Trailing slashes are trimmed
@@ -32,7 +34,7 @@ namespace k8s.Models
/// ///
/// Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` /// Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo`
/// would not allow `/food` or `/etc/foo`</param> /// would not allow `/food` or `/etc/foo`</param>
public V1beta1AllowedHostPath(string pathPrefix = default(string)) public Policyv1beta1AllowedHostPath(string pathPrefix = default(string))
{ {
PathPrefix = pathPrefix; PathPrefix = pathPrefix;
CustomInit(); CustomInit();

View File

@@ -15,27 +15,27 @@ namespace k8s.Models
/// FSGroupStrategyOptions defines the strategy type and options used to /// FSGroupStrategyOptions defines the strategy type and options used to
/// create the strategy. /// create the strategy.
/// </summary> /// </summary>
public partial class V1beta1FSGroupStrategyOptions public partial class Policyv1beta1FSGroupStrategyOptions
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1FSGroupStrategyOptions /// Initializes a new instance of the
/// class. /// Policyv1beta1FSGroupStrategyOptions class.
/// </summary> /// </summary>
public V1beta1FSGroupStrategyOptions() public Policyv1beta1FSGroupStrategyOptions()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1FSGroupStrategyOptions /// Initializes a new instance of the
/// class. /// Policyv1beta1FSGroupStrategyOptions class.
/// </summary> /// </summary>
/// <param name="ranges">Ranges are the allowed ranges of fs groups. /// <param name="ranges">Ranges are the allowed ranges of fs groups.
/// If you would like to force a single fs group then supply a single /// If you would like to force a single fs group then supply a single
/// range with the same start and end.</param> /// range with the same start and end.</param>
/// <param name="rule">Rule is the strategy that will dictate what /// <param name="rule">Rule is the strategy that will dictate what
/// FSGroup is used in the SecurityContext.</param> /// FSGroup is used in the SecurityContext.</param>
public V1beta1FSGroupStrategyOptions(IList<V1beta1IDRange> ranges = default(IList<V1beta1IDRange>), string rule = default(string)) public Policyv1beta1FSGroupStrategyOptions(IList<Policyv1beta1IDRange> ranges = default(IList<Policyv1beta1IDRange>), string rule = default(string))
{ {
Ranges = ranges; Ranges = ranges;
Rule = rule; Rule = rule;
@@ -53,7 +53,7 @@ namespace k8s.Models
/// with the same start and end. /// with the same start and end.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "ranges")] [JsonProperty(PropertyName = "ranges")]
public IList<V1beta1IDRange> Ranges { get; set; } public IList<Policyv1beta1IDRange> Ranges { get; set; }
/// <summary> /// <summary>
/// Gets or sets rule is the strategy that will dictate what FSGroup is /// Gets or sets rule is the strategy that will dictate what FSGroup is

View File

@@ -14,22 +14,22 @@ namespace k8s.Models
/// policy for pods to use. It requires both the start and end to be /// policy for pods to use. It requires both the start and end to be
/// defined. /// defined.
/// </summary> /// </summary>
public partial class V1beta1HostPortRange public partial class Policyv1beta1HostPortRange
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1HostPortRange class. /// Initializes a new instance of the Policyv1beta1HostPortRange class.
/// </summary> /// </summary>
public V1beta1HostPortRange() public Policyv1beta1HostPortRange()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1HostPortRange class. /// Initializes a new instance of the Policyv1beta1HostPortRange class.
/// </summary> /// </summary>
/// <param name="max">max is the end of the range, inclusive.</param> /// <param name="max">max is the end of the range, inclusive.</param>
/// <param name="min">min is the start of the range, inclusive.</param> /// <param name="min">min is the start of the range, inclusive.</param>
public V1beta1HostPortRange(int max, int min) public Policyv1beta1HostPortRange(int max, int min)
{ {
Max = max; Max = max;
Min = min; Min = min;

View File

@@ -12,22 +12,22 @@ namespace k8s.Models
/// <summary> /// <summary>
/// ID Range provides a min/max of an allowed range of IDs. /// ID Range provides a min/max of an allowed range of IDs.
/// </summary> /// </summary>
public partial class V1beta1IDRange public partial class Policyv1beta1IDRange
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1IDRange class. /// Initializes a new instance of the Policyv1beta1IDRange class.
/// </summary> /// </summary>
public V1beta1IDRange() public Policyv1beta1IDRange()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1IDRange class. /// Initializes a new instance of the Policyv1beta1IDRange class.
/// </summary> /// </summary>
/// <param name="max">Max is the end of the range, inclusive.</param> /// <param name="max">Max is the end of the range, inclusive.</param>
/// <param name="min">Min is the start of the range, inclusive.</param> /// <param name="min">Min is the start of the range, inclusive.</param>
public V1beta1IDRange(long max, long min) public Policyv1beta1IDRange(long max, long min)
{ {
Max = max; Max = max;
Min = min; Min = min;

View File

@@ -13,18 +13,20 @@ namespace k8s.Models
/// Pod Security Policy governs the ability to make requests that affect /// Pod Security Policy governs the ability to make requests that affect
/// the Security Context that will be applied to a pod and container. /// the Security Context that will be applied to a pod and container.
/// </summary> /// </summary>
public partial class V1beta1PodSecurityPolicy public partial class Policyv1beta1PodSecurityPolicy
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1PodSecurityPolicy class. /// Initializes a new instance of the Policyv1beta1PodSecurityPolicy
/// class.
/// </summary> /// </summary>
public V1beta1PodSecurityPolicy() public Policyv1beta1PodSecurityPolicy()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1PodSecurityPolicy class. /// Initializes a new instance of the Policyv1beta1PodSecurityPolicy
/// class.
/// </summary> /// </summary>
/// <param name="apiVersion">APIVersion defines the versioned schema of /// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized /// this representation of an object. Servers should convert recognized
@@ -39,7 +41,7 @@ namespace k8s.Models
/// <param name="metadata">Standard object's metadata. More info: /// <param name="metadata">Standard object's metadata. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
/// <param name="spec">spec defines the policy enforced.</param> /// <param name="spec">spec defines the policy enforced.</param>
public V1beta1PodSecurityPolicy(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1PodSecurityPolicySpec spec = default(V1beta1PodSecurityPolicySpec)) public Policyv1beta1PodSecurityPolicy(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Policyv1beta1PodSecurityPolicySpec spec = default(Policyv1beta1PodSecurityPolicySpec))
{ {
ApiVersion = apiVersion; ApiVersion = apiVersion;
Kind = kind; Kind = kind;
@@ -84,7 +86,7 @@ namespace k8s.Models
/// Gets or sets spec defines the policy enforced. /// Gets or sets spec defines the policy enforced.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "spec")] [JsonProperty(PropertyName = "spec")]
public V1beta1PodSecurityPolicySpec Spec { get; set; } public Policyv1beta1PodSecurityPolicySpec Spec { get; set; }
/// <summary> /// <summary>
/// Validate the object. /// Validate the object.

View File

@@ -15,20 +15,20 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Pod Security Policy List is a list of PodSecurityPolicy objects. /// Pod Security Policy List is a list of PodSecurityPolicy objects.
/// </summary> /// </summary>
public partial class V1beta1PodSecurityPolicyList public partial class Policyv1beta1PodSecurityPolicyList
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1PodSecurityPolicyList /// Initializes a new instance of the
/// class. /// Policyv1beta1PodSecurityPolicyList class.
/// </summary> /// </summary>
public V1beta1PodSecurityPolicyList() public Policyv1beta1PodSecurityPolicyList()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1PodSecurityPolicyList /// Initializes a new instance of the
/// class. /// Policyv1beta1PodSecurityPolicyList class.
/// </summary> /// </summary>
/// <param name="items">Items is a list of schema objects.</param> /// <param name="items">Items is a list of schema objects.</param>
/// <param name="apiVersion">APIVersion defines the versioned schema of /// <param name="apiVersion">APIVersion defines the versioned schema of
@@ -43,7 +43,7 @@ namespace k8s.Models
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard list metadata. More info: /// <param name="metadata">Standard list metadata. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
public V1beta1PodSecurityPolicyList(IList<V1beta1PodSecurityPolicy> items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) public Policyv1beta1PodSecurityPolicyList(IList<Policyv1beta1PodSecurityPolicy> items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta))
{ {
ApiVersion = apiVersion; ApiVersion = apiVersion;
Items = items; Items = items;
@@ -71,7 +71,7 @@ namespace k8s.Models
/// Gets or sets items is a list of schema objects. /// Gets or sets items is a list of schema objects.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "items")] [JsonProperty(PropertyName = "items")]
public IList<V1beta1PodSecurityPolicy> Items { get; set; } public IList<Policyv1beta1PodSecurityPolicy> Items { get; set; }
/// <summary> /// <summary>
/// Gets or sets kind is a string value representing the REST resource /// Gets or sets kind is a string value representing the REST resource

View File

@@ -15,20 +15,20 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Pod Security Policy Spec defines the policy enforced. /// Pod Security Policy Spec defines the policy enforced.
/// </summary> /// </summary>
public partial class V1beta1PodSecurityPolicySpec public partial class Policyv1beta1PodSecurityPolicySpec
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1PodSecurityPolicySpec /// Initializes a new instance of the
/// class. /// Policyv1beta1PodSecurityPolicySpec class.
/// </summary> /// </summary>
public V1beta1PodSecurityPolicySpec() public Policyv1beta1PodSecurityPolicySpec()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1PodSecurityPolicySpec /// Initializes a new instance of the
/// class. /// Policyv1beta1PodSecurityPolicySpec class.
/// </summary> /// </summary>
/// <param name="fsGroup">FSGroup is the strategy that will dictate /// <param name="fsGroup">FSGroup is the strategy that will dictate
/// what fs group is used by the SecurityContext.</param> /// what fs group is used by the SecurityContext.</param>
@@ -85,7 +85,7 @@ namespace k8s.Models
/// are required to be dropped and cannot be added.</param> /// are required to be dropped and cannot be added.</param>
/// <param name="volumes">volumes is a white list of allowed volume /// <param name="volumes">volumes is a white list of allowed volume
/// plugins. Empty indicates that all plugins may be used.</param> /// plugins. Empty indicates that all plugins may be used.</param>
public V1beta1PodSecurityPolicySpec(V1beta1FSGroupStrategyOptions fsGroup, V1beta1RunAsUserStrategyOptions runAsUser, V1beta1SELinuxStrategyOptions seLinux, V1beta1SupplementalGroupsStrategyOptions supplementalGroups, bool? allowPrivilegeEscalation = default(bool?), IList<string> allowedCapabilities = default(IList<string>), IList<V1beta1AllowedFlexVolume> allowedFlexVolumes = default(IList<V1beta1AllowedFlexVolume>), IList<V1beta1AllowedHostPath> allowedHostPaths = default(IList<V1beta1AllowedHostPath>), IList<string> defaultAddCapabilities = default(IList<string>), bool? defaultAllowPrivilegeEscalation = default(bool?), bool? hostIPC = default(bool?), bool? hostNetwork = default(bool?), bool? hostPID = default(bool?), IList<V1beta1HostPortRange> hostPorts = default(IList<V1beta1HostPortRange>), 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> defaultAddCapabilities = default(IList<string>), bool? defaultAllowPrivilegeEscalation = default(bool?), 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; AllowPrivilegeEscalation = allowPrivilegeEscalation;
AllowedCapabilities = allowedCapabilities; AllowedCapabilities = allowedCapabilities;
@@ -138,14 +138,14 @@ namespace k8s.Models
/// Flexvolumes is allowed in the "Volumes" field. /// Flexvolumes is allowed in the "Volumes" field.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "allowedFlexVolumes")] [JsonProperty(PropertyName = "allowedFlexVolumes")]
public IList<V1beta1AllowedFlexVolume> AllowedFlexVolumes { get; set; } public IList<Policyv1beta1AllowedFlexVolume> AllowedFlexVolumes { get; set; }
/// <summary> /// <summary>
/// Gets or sets is a white list of allowed host paths. Empty indicates /// Gets or sets is a white list of allowed host paths. Empty indicates
/// that all host paths may be used. /// that all host paths may be used.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "allowedHostPaths")] [JsonProperty(PropertyName = "allowedHostPaths")]
public IList<V1beta1AllowedHostPath> AllowedHostPaths { get; set; } public IList<Policyv1beta1AllowedHostPath> AllowedHostPaths { get; set; }
/// <summary> /// <summary>
/// Gets or sets defaultAddCapabilities is the default set of /// Gets or sets defaultAddCapabilities is the default set of
@@ -171,7 +171,7 @@ namespace k8s.Models
/// group is used by the SecurityContext. /// group is used by the SecurityContext.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "fsGroup")] [JsonProperty(PropertyName = "fsGroup")]
public V1beta1FSGroupStrategyOptions FsGroup { get; set; } public Policyv1beta1FSGroupStrategyOptions FsGroup { get; set; }
/// <summary> /// <summary>
/// Gets or sets hostIPC determines if the policy allows the use of /// Gets or sets hostIPC determines if the policy allows the use of
@@ -199,7 +199,7 @@ namespace k8s.Models
/// allowed to be exposed. /// allowed to be exposed.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "hostPorts")] [JsonProperty(PropertyName = "hostPorts")]
public IList<V1beta1HostPortRange> HostPorts { get; set; } public IList<Policyv1beta1HostPortRange> HostPorts { get; set; }
/// <summary> /// <summary>
/// Gets or sets privileged determines if a pod can request to be run /// Gets or sets privileged determines if a pod can request to be run
@@ -232,21 +232,21 @@ namespace k8s.Models
/// allowable RunAsUser values that may be set. /// allowable RunAsUser values that may be set.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "runAsUser")] [JsonProperty(PropertyName = "runAsUser")]
public V1beta1RunAsUserStrategyOptions RunAsUser { get; set; } public Policyv1beta1RunAsUserStrategyOptions RunAsUser { get; set; }
/// <summary> /// <summary>
/// Gets or sets seLinux is the strategy that will dictate the /// Gets or sets seLinux is the strategy that will dictate the
/// allowable labels that may be set. /// allowable labels that may be set.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "seLinux")] [JsonProperty(PropertyName = "seLinux")]
public V1beta1SELinuxStrategyOptions SeLinux { get; set; } public Policyv1beta1SELinuxStrategyOptions SeLinux { get; set; }
/// <summary> /// <summary>
/// Gets or sets supplementalGroups is the strategy that will dictate /// Gets or sets supplementalGroups is the strategy that will dictate
/// what supplemental groups are used by the SecurityContext. /// what supplemental groups are used by the SecurityContext.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "supplementalGroups")] [JsonProperty(PropertyName = "supplementalGroups")]
public V1beta1SupplementalGroupsStrategyOptions SupplementalGroups { get; set; } public Policyv1beta1SupplementalGroupsStrategyOptions SupplementalGroups { get; set; }
/// <summary> /// <summary>
/// Gets or sets volumes is a white list of allowed volume plugins. /// Gets or sets volumes is a white list of allowed volume plugins.

View File

@@ -16,26 +16,26 @@ namespace k8s.Models
/// Run A sUser Strategy Options defines the strategy type and any options /// Run A sUser Strategy Options defines the strategy type and any options
/// used to create the strategy. /// used to create the strategy.
/// </summary> /// </summary>
public partial class V1beta1RunAsUserStrategyOptions public partial class Policyv1beta1RunAsUserStrategyOptions
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1RunAsUserStrategyOptions /// Initializes a new instance of the
/// class. /// Policyv1beta1RunAsUserStrategyOptions class.
/// </summary> /// </summary>
public V1beta1RunAsUserStrategyOptions() public Policyv1beta1RunAsUserStrategyOptions()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1RunAsUserStrategyOptions /// Initializes a new instance of the
/// class. /// Policyv1beta1RunAsUserStrategyOptions class.
/// </summary> /// </summary>
/// <param name="rule">Rule is the strategy that will dictate the /// <param name="rule">Rule is the strategy that will dictate the
/// allowable RunAsUser values that may be set.</param> /// allowable RunAsUser values that may be set.</param>
/// <param name="ranges">Ranges are the allowed ranges of uids that may /// <param name="ranges">Ranges are the allowed ranges of uids that may
/// be used.</param> /// be used.</param>
public V1beta1RunAsUserStrategyOptions(string rule, IList<V1beta1IDRange> ranges = default(IList<V1beta1IDRange>)) public Policyv1beta1RunAsUserStrategyOptions(string rule, IList<Policyv1beta1IDRange> ranges = default(IList<Policyv1beta1IDRange>))
{ {
Ranges = ranges; Ranges = ranges;
Rule = rule; Rule = rule;
@@ -52,7 +52,7 @@ namespace k8s.Models
/// used. /// used.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "ranges")] [JsonProperty(PropertyName = "ranges")]
public IList<V1beta1IDRange> Ranges { get; set; } public IList<Policyv1beta1IDRange> Ranges { get; set; }
/// <summary> /// <summary>
/// Gets or sets rule is the strategy that will dictate the allowable /// Gets or sets rule is the strategy that will dictate the allowable

View File

@@ -14,27 +14,27 @@ namespace k8s.Models
/// SELinux Strategy Options defines the strategy type and any options /// SELinux Strategy Options defines the strategy type and any options
/// used to create the strategy. /// used to create the strategy.
/// </summary> /// </summary>
public partial class V1beta1SELinuxStrategyOptions public partial class Policyv1beta1SELinuxStrategyOptions
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1SELinuxStrategyOptions /// Initializes a new instance of the
/// class. /// Policyv1beta1SELinuxStrategyOptions class.
/// </summary> /// </summary>
public V1beta1SELinuxStrategyOptions() public Policyv1beta1SELinuxStrategyOptions()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the V1beta1SELinuxStrategyOptions /// Initializes a new instance of the
/// class. /// Policyv1beta1SELinuxStrategyOptions class.
/// </summary> /// </summary>
/// <param name="rule">type is the strategy that will dictate the /// <param name="rule">type is the strategy that will dictate the
/// allowable labels that may be set.</param> /// allowable labels that may be set.</param>
/// <param name="seLinuxOptions">seLinuxOptions required to run as; /// <param name="seLinuxOptions">seLinuxOptions required to run as;
/// required for MustRunAs More info: /// required for MustRunAs More info:
/// https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</param> /// https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</param>
public V1beta1SELinuxStrategyOptions(string rule, V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions)) public Policyv1beta1SELinuxStrategyOptions(string rule, V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions))
{ {
Rule = rule; Rule = rule;
SeLinuxOptions = seLinuxOptions; SeLinuxOptions = seLinuxOptions;

View File

@@ -15,27 +15,27 @@ namespace k8s.Models
/// SupplementalGroupsStrategyOptions defines the strategy type and options /// SupplementalGroupsStrategyOptions defines the strategy type and options
/// used to create the strategy. /// used to create the strategy.
/// </summary> /// </summary>
public partial class V1beta1SupplementalGroupsStrategyOptions public partial class Policyv1beta1SupplementalGroupsStrategyOptions
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the /// Initializes a new instance of the
/// V1beta1SupplementalGroupsStrategyOptions class. /// Policyv1beta1SupplementalGroupsStrategyOptions class.
/// </summary> /// </summary>
public V1beta1SupplementalGroupsStrategyOptions() public Policyv1beta1SupplementalGroupsStrategyOptions()
{ {
CustomInit(); CustomInit();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the /// Initializes a new instance of the
/// V1beta1SupplementalGroupsStrategyOptions class. /// Policyv1beta1SupplementalGroupsStrategyOptions class.
/// </summary> /// </summary>
/// <param name="ranges">Ranges are the allowed ranges of supplemental /// <param name="ranges">Ranges are the allowed ranges of supplemental
/// groups. If you would like to force a single supplemental group /// groups. If you would like to force a single supplemental group
/// then supply a single range with the same start and end.</param> /// then supply a single range with the same start and end.</param>
/// <param name="rule">Rule is the strategy that will dictate what /// <param name="rule">Rule is the strategy that will dictate what
/// supplemental groups is used in the SecurityContext.</param> /// supplemental groups is used in the SecurityContext.</param>
public V1beta1SupplementalGroupsStrategyOptions(IList<V1beta1IDRange> ranges = default(IList<V1beta1IDRange>), string rule = default(string)) public Policyv1beta1SupplementalGroupsStrategyOptions(IList<Policyv1beta1IDRange> ranges = default(IList<Policyv1beta1IDRange>), string rule = default(string))
{ {
Ranges = ranges; Ranges = ranges;
Rule = rule; Rule = rule;
@@ -53,7 +53,7 @@ namespace k8s.Models
/// a single range with the same start and end. /// a single range with the same start and end.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "ranges")] [JsonProperty(PropertyName = "ranges")]
public IList<V1beta1IDRange> Ranges { get; set; } public IList<Policyv1beta1IDRange> Ranges { get; set; }
/// <summary> /// <summary>
/// Gets or sets rule is the strategy that will dictate what /// Gets or sets rule is the strategy that will dictate what

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 Newtonsoft.Json;
using System.Linq;
/// <summary>
/// APIService represents a server for a particular GroupVersion. Name must
/// be "version.group".
/// </summary>
public partial class V1APIService
{
/// <summary>
/// Initializes a new instance of the V1APIService class.
/// </summary>
public V1APIService()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIService 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="spec">Spec contains information for locating and
/// communicating with a server</param>
/// <param name="status">Status contains derived information about an
/// API server</param>
public V1APIService(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1APIServiceSpec spec = default(V1APIServiceSpec), V1APIServiceStatus status = default(V1APIServiceStatus))
{
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>
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets spec contains information for locating and
/// communicating with a server
/// </summary>
[JsonProperty(PropertyName = "spec")]
public V1APIServiceSpec Spec { get; set; }
/// <summary>
/// Gets or sets status contains derived information about an API
/// server
/// </summary>
[JsonProperty(PropertyName = "status")]
public V1APIServiceStatus 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();
}
}
}
}

View File

@@ -0,0 +1,102 @@
// <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;
public partial class V1APIServiceCondition
{
/// <summary>
/// Initializes a new instance of the V1APIServiceCondition class.
/// </summary>
public V1APIServiceCondition()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIServiceCondition class.
/// </summary>
/// <param name="status">Status is the status of the condition. Can be
/// True, False, Unknown.</param>
/// <param name="type">Type is the type of the condition.</param>
/// <param name="lastTransitionTime">Last time the condition
/// transitioned from one status to another.</param>
/// <param name="message">Human-readable message indicating details
/// about last transition.</param>
/// <param name="reason">Unique, one-word, CamelCase reason for the
/// condition's last transition.</param>
public V1APIServiceCondition(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 last time the condition transitioned from one status
/// to another.
/// </summary>
[JsonProperty(PropertyName = "lastTransitionTime")]
public System.DateTime? LastTransitionTime { get; set; }
/// <summary>
/// Gets or sets human-readable message indicating details about last
/// transition.
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets unique, one-word, CamelCase 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. Can be True,
/// False, Unknown.
/// </summary>
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
/// <summary>
/// Gets or sets type is the type of the 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,109 @@
// <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>
/// APIServiceList is a list of APIService objects.
/// </summary>
public partial class V1APIServiceList
{
/// <summary>
/// Initializes a new instance of the V1APIServiceList class.
/// </summary>
public V1APIServiceList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIServiceList 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>
public V1APIServiceList(IList<V1APIService> 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>
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1APIService> 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>
/// </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,165 @@
// <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>
/// APIServiceSpec contains information for locating and communicating with
/// a server. Only https is supported, though you are able to disable
/// certificate verification.
/// </summary>
public partial class V1APIServiceSpec
{
/// <summary>
/// Initializes a new instance of the V1APIServiceSpec class.
/// </summary>
public V1APIServiceSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIServiceSpec class.
/// </summary>
/// <param name="caBundle">CABundle is a PEM encoded CA bundle which
/// will be used to validate an API server's serving
/// certificate.</param>
/// <param name="groupPriorityMinimum">GroupPriorityMininum is the
/// priority this group should have at least. Higher priority means
/// that the group is preferred by clients over lower priority ones.
/// Note that other versions of this group might specify even higher
/// GroupPriorityMininum values such that the whole group gets a higher
/// priority. The primary sort is based on GroupPriorityMinimum,
/// ordered highest number to lowest (20 before 10). The secondary sort
/// is based on the alphabetical comparison of the name of the object.
/// (v1.bar before v1.foo) We'd recommend something like: *.k8s.io
/// (except extensions) at 18000 and PaaSes (OpenShift, Deis) are
/// recommended to be in the 2000s</param>
/// <param name="service">Service is a reference to the service for
/// this API server. It must communicate on port 443 If the Service is
/// nil, that means the handling for the API groupversion is handled
/// locally on this server. The call will simply delegate to the normal
/// handler chain to be fulfilled.</param>
/// <param name="versionPriority">VersionPriority controls the ordering
/// of this API version inside of its group. Must be greater than
/// zero. The primary sort is based on VersionPriority, ordered highest
/// to lowest (20 before 10). The secondary sort is based on the
/// alphabetical comparison of the name of the object. (v1.bar before
/// v1.foo) Since it's inside of a group, the number can be small,
/// probably in the 10s.</param>
/// <param name="group">Group is the API group name this server
/// hosts</param>
/// <param name="insecureSkipTLSVerify">InsecureSkipTLSVerify disables
/// TLS certificate verification when communicating with this server.
/// This is strongly discouraged. You should use the CABundle
/// instead.</param>
/// <param name="version">Version is the API version this server hosts.
/// For example, "v1"</param>
public V1APIServiceSpec(byte[] caBundle, int groupPriorityMinimum, V1ServiceReference service, int versionPriority, string group = default(string), bool? insecureSkipTLSVerify = default(bool?), string version = default(string))
{
CaBundle = caBundle;
Group = group;
GroupPriorityMinimum = groupPriorityMinimum;
InsecureSkipTLSVerify = insecureSkipTLSVerify;
Service = service;
Version = version;
VersionPriority = versionPriority;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets cABundle is a PEM encoded CA bundle which will be used
/// to validate an API server's serving certificate.
/// </summary>
[JsonProperty(PropertyName = "caBundle")]
public byte[] CaBundle { get; set; }
/// <summary>
/// Gets or sets group is the API group name this server hosts
/// </summary>
[JsonProperty(PropertyName = "group")]
public string Group { get; set; }
/// <summary>
/// Gets or sets groupPriorityMininum is the priority this group should
/// have at least. Higher priority means that the group is preferred by
/// clients over lower priority ones. Note that other versions of this
/// group might specify even higher GroupPriorityMininum values such
/// that the whole group gets a higher priority. The primary sort is
/// based on GroupPriorityMinimum, ordered highest number to lowest (20
/// before 10). The secondary sort is based on the alphabetical
/// comparison of the name of the object. (v1.bar before v1.foo) We'd
/// recommend something like: *.k8s.io (except extensions) at 18000 and
/// PaaSes (OpenShift, Deis) are recommended to be in the 2000s
/// </summary>
[JsonProperty(PropertyName = "groupPriorityMinimum")]
public int GroupPriorityMinimum { get; set; }
/// <summary>
/// Gets or sets insecureSkipTLSVerify disables TLS certificate
/// verification when communicating with this server. This is strongly
/// discouraged. You should use the CABundle instead.
/// </summary>
[JsonProperty(PropertyName = "insecureSkipTLSVerify")]
public bool? InsecureSkipTLSVerify { get; set; }
/// <summary>
/// Gets or sets service is a reference to the service for this API
/// server. It must communicate on port 443 If the Service is nil,
/// that means the handling for the API groupversion is handled locally
/// on this server. The call will simply delegate to the normal handler
/// chain to be fulfilled.
/// </summary>
[JsonProperty(PropertyName = "service")]
public V1ServiceReference Service { get; set; }
/// <summary>
/// Gets or sets version is the API version this server hosts. For
/// example, "v1"
/// </summary>
[JsonProperty(PropertyName = "version")]
public string Version { get; set; }
/// <summary>
/// Gets or sets versionPriority controls the ordering of this API
/// version inside of its group. Must be greater than zero. The
/// primary sort is based on VersionPriority, ordered highest to lowest
/// (20 before 10). The secondary sort is based on the alphabetical
/// comparison of the name of the object. (v1.bar before v1.foo) Since
/// it's inside of a group, the number can be small, probably in the
/// 10s.
/// </summary>
[JsonProperty(PropertyName = "versionPriority")]
public int VersionPriority { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (CaBundle == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "CaBundle");
}
if (Service == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Service");
}
}
}
}

View File

@@ -0,0 +1,50 @@
// <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.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// APIServiceStatus contains derived information about an API server
/// </summary>
public partial class V1APIServiceStatus
{
/// <summary>
/// Initializes a new instance of the V1APIServiceStatus class.
/// </summary>
public V1APIServiceStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIServiceStatus class.
/// </summary>
/// <param name="conditions">Current service state of
/// apiService.</param>
public V1APIServiceStatus(IList<V1APIServiceCondition> conditions = default(IList<V1APIServiceCondition>))
{
Conditions = conditions;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets current service state of apiService.
/// </summary>
[JsonProperty(PropertyName = "conditions")]
public IList<V1APIServiceCondition> Conditions { get; set; }
}
}

View File

@@ -8,10 +8,13 @@ namespace k8s.Models
{ {
using Microsoft.Rest; using Microsoft.Rest;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// Represents storage that is managed by an external CSI volume driver /// Represents storage that is managed by an external CSI volume driver
/// (Beta feature)
/// </summary> /// </summary>
public partial class V1CSIPersistentVolumeSource public partial class V1CSIPersistentVolumeSource
{ {
@@ -33,13 +36,43 @@ namespace k8s.Models
/// <param name="volumeHandle">VolumeHandle is the unique volume name /// <param name="volumeHandle">VolumeHandle is the unique volume name
/// returned by the CSI volume plugins CreateVolume to refer to the /// returned by the CSI volume plugins CreateVolume to refer to the
/// volume on all subsequent calls. Required.</param> /// volume on all subsequent calls. Required.</param>
/// <param name="controllerPublishSecretRef">ControllerPublishSecretRef
/// is a reference to the secret object containing sensitive
/// information to pass to the CSI driver to complete the CSI
/// ControllerPublishVolume and ControllerUnpublishVolume calls. This
/// field is optional, and may be empty if no secret is required. If
/// the secret object contains more than one secret, all secrets are
/// 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>
/// <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
/// NodeUnpublishVolume calls. This field is optional, and may be
/// empty if no secret is required. If the secret object contains more
/// than one secret, all secrets are passed.</param>
/// <param name="nodeStageSecretRef">NodeStageSecretRef is a reference
/// to the secret object containing sensitive information to pass to
/// the CSI driver to complete the CSI NodeStageVolume and
/// NodeStageVolume and NodeUnstageVolume calls. This field is
/// optional, and may be empty if no secret is required. If the secret
/// object contains more than one secret, all secrets are
/// passed.</param>
/// <param name="readOnlyProperty">Optional: The value to pass to /// <param name="readOnlyProperty">Optional: The value to pass to
/// ControllerPublishVolumeRequest. Defaults to false /// ControllerPublishVolumeRequest. Defaults to false
/// (read/write).</param> /// (read/write).</param>
public V1CSIPersistentVolumeSource(string driver, string volumeHandle, bool? readOnlyProperty = default(bool?)) /// <param name="volumeAttributes">Attributes of the volume to
/// publish.</param>
public V1CSIPersistentVolumeSource(string driver, string volumeHandle, V1SecretReference controllerPublishSecretRef = default(V1SecretReference), string fsType = default(string), V1SecretReference nodePublishSecretRef = default(V1SecretReference), V1SecretReference nodeStageSecretRef = default(V1SecretReference), bool? readOnlyProperty = default(bool?), IDictionary<string, string> volumeAttributes = default(IDictionary<string, string>))
{ {
ControllerPublishSecretRef = controllerPublishSecretRef;
Driver = driver; Driver = driver;
FsType = fsType;
NodePublishSecretRef = nodePublishSecretRef;
NodeStageSecretRef = nodeStageSecretRef;
ReadOnlyProperty = readOnlyProperty; ReadOnlyProperty = readOnlyProperty;
VolumeAttributes = volumeAttributes;
VolumeHandle = volumeHandle; VolumeHandle = volumeHandle;
CustomInit(); CustomInit();
} }
@@ -49,6 +82,17 @@ namespace k8s.Models
/// </summary> /// </summary>
partial void CustomInit(); partial void CustomInit();
/// <summary>
/// Gets or sets controllerPublishSecretRef is a reference to the
/// secret object containing sensitive information to pass to the CSI
/// driver to complete the CSI ControllerPublishVolume and
/// ControllerUnpublishVolume calls. This field is optional, and may
/// be empty if no secret is required. If the secret object contains
/// more than one secret, all secrets are passed.
/// </summary>
[JsonProperty(PropertyName = "controllerPublishSecretRef")]
public V1SecretReference ControllerPublishSecretRef { get; set; }
/// <summary> /// <summary>
/// Gets or sets driver is the name of the driver to use for this /// Gets or sets driver is the name of the driver to use for this
/// volume. Required. /// volume. Required.
@@ -56,6 +100,36 @@ namespace k8s.Models
[JsonProperty(PropertyName = "driver")] [JsonProperty(PropertyName = "driver")]
public string Driver { get; set; } public string Driver { get; set; }
/// <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; }
/// <summary>
/// Gets or sets nodePublishSecretRef is a reference to the secret
/// object containing sensitive information to pass to the CSI driver
/// to complete the CSI NodePublishVolume and NodeUnpublishVolume
/// calls. This field is optional, and may be empty if no secret is
/// required. If the secret object contains more than one secret, all
/// secrets are passed.
/// </summary>
[JsonProperty(PropertyName = "nodePublishSecretRef")]
public V1SecretReference NodePublishSecretRef { get; set; }
/// <summary>
/// Gets or sets nodeStageSecretRef is a reference to the secret object
/// containing sensitive information to pass to the CSI driver to
/// complete the CSI NodeStageVolume and NodeStageVolume and
/// NodeUnstageVolume calls. This field is optional, and may be empty
/// if no secret is required. If the secret object contains more than
/// one secret, all secrets are passed.
/// </summary>
[JsonProperty(PropertyName = "nodeStageSecretRef")]
public V1SecretReference NodeStageSecretRef { get; set; }
/// <summary> /// <summary>
/// Gets or sets optional: The value to pass to /// Gets or sets optional: The value to pass to
/// ControllerPublishVolumeRequest. Defaults to false (read/write). /// ControllerPublishVolumeRequest. Defaults to false (read/write).
@@ -63,6 +137,12 @@ namespace k8s.Models
[JsonProperty(PropertyName = "readOnly")] [JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; } public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Gets or sets attributes of the volume to publish.
/// </summary>
[JsonProperty(PropertyName = "volumeAttributes")]
public IDictionary<string, string> VolumeAttributes { get; set; }
/// <summary> /// <summary>
/// Gets or sets volumeHandle is the unique volume name returned by the /// Gets or sets volumeHandle is the unique volume name returned by the
/// CSI volume plugins CreateVolume to refer to the volume on all /// CSI volume plugins CreateVolume to refer to the volume on all

View File

@@ -32,8 +32,18 @@ namespace k8s.Models
/// schemas to the latest internal value, and may reject unrecognized /// schemas to the latest internal value, and may reject unrecognized
/// values. More info: /// values. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</param>
/// <param name="binaryData">BinaryData contains the binary data. Each
/// key must consist of alphanumeric characters, '-', '_' or '.'.
/// BinaryData can contain byte sequences that are not in the UTF-8
/// range. The keys stored in BinaryData must not overlap with the ones
/// in the Data field, this is enforced during validation process.
/// Using this field will require 1.10+ apiserver and kubelet.</param>
/// <param name="data">Data contains the configuration data. Each key /// <param name="data">Data contains the configuration data. Each key
/// must consist of alphanumeric characters, '-', '_' or '.'.</param> /// must consist of alphanumeric characters, '-', '_' or '.'. Values
/// with non-UTF-8 byte sequences must use the BinaryData field. The
/// keys stored in Data must not overlap with the keys in the
/// BinaryData field, this is enforced during validation
/// process.</param>
/// <param name="kind">Kind is a string value representing the REST /// <param name="kind">Kind is a string value representing the REST
/// resource this object represents. Servers may infer this from the /// resource this object represents. Servers may infer this from the
/// endpoint the client submits requests to. Cannot be updated. In /// endpoint the client submits requests to. Cannot be updated. In
@@ -41,9 +51,10 @@ namespace k8s.Models
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object's metadata. More info: /// <param name="metadata">Standard object's metadata. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
public V1ConfigMap(string apiVersion = default(string), IDictionary<string, string> data = default(IDictionary<string, string>), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) public V1ConfigMap(string apiVersion = default(string), IDictionary<string, byte[]> binaryData = default(IDictionary<string, byte[]>), IDictionary<string, string> data = default(IDictionary<string, string>), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta))
{ {
ApiVersion = apiVersion; ApiVersion = apiVersion;
BinaryData = binaryData;
Data = data; Data = data;
Kind = kind; Kind = kind;
Metadata = metadata; Metadata = metadata;
@@ -65,9 +76,23 @@ namespace k8s.Models
[JsonProperty(PropertyName = "apiVersion")] [JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; } public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets binaryData contains the binary data. Each key must
/// consist of alphanumeric characters, '-', '_' or '.'. BinaryData can
/// contain byte sequences that are not in the UTF-8 range. The keys
/// stored in BinaryData must not overlap with the ones in the Data
/// field, this is enforced during validation process. Using this field
/// will require 1.10+ apiserver and kubelet.
/// </summary>
[JsonProperty(PropertyName = "binaryData")]
public IDictionary<string, byte[]> BinaryData { get; set; }
/// <summary> /// <summary>
/// Gets or sets data contains the configuration data. Each key must /// Gets or sets data contains the configuration data. Each key must
/// consist of alphanumeric characters, '-', '_' or '.'. /// consist of alphanumeric characters, '-', '_' or '.'. Values with
/// non-UTF-8 byte sequences must use the BinaryData field. The keys
/// stored in Data must not overlap with the keys in the BinaryData
/// field, this is enforced during validation process.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "data")] [JsonProperty(PropertyName = "data")]
public IDictionary<string, string> Data { get; set; } public IDictionary<string, string> Data { get; set; }

View File

@@ -29,7 +29,7 @@ namespace k8s.Models
/// Initializes a new instance of the V1ContainerImage class. /// Initializes a new instance of the V1ContainerImage class.
/// </summary> /// </summary>
/// <param name="names">Names by which this image is known. e.g. /// <param name="names">Names by which this image is known. e.g.
/// ["gcr.io/google_containers/hyperkube:v1.0.7", /// ["k8s.gcr.io/hyperkube:v1.0.7",
/// "dockerhub.io/google_containers/hyperkube:v1.0.7"]</param> /// "dockerhub.io/google_containers/hyperkube:v1.0.7"]</param>
/// <param name="sizeBytes">The size of the image in bytes.</param> /// <param name="sizeBytes">The size of the image in bytes.</param>
public V1ContainerImage(IList<string> names, long? sizeBytes = default(long?)) public V1ContainerImage(IList<string> names, long? sizeBytes = default(long?))
@@ -46,7 +46,7 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Gets or sets names by which this image is known. e.g. /// Gets or sets names by which this image is known. e.g.
/// ["gcr.io/google_containers/hyperkube:v1.0.7", /// ["k8s.gcr.io/hyperkube:v1.0.7",
/// "dockerhub.io/google_containers/hyperkube:v1.0.7"] /// "dockerhub.io/google_containers/hyperkube:v1.0.7"]
/// </summary> /// </summary>
[JsonProperty(PropertyName = "names")] [JsonProperty(PropertyName = "names")]

View File

@@ -6,7 +6,6 @@
namespace k8s.Models namespace k8s.Models
{ {
using Microsoft.Rest;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@@ -40,14 +39,6 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Initializes a new instance of the V1Endpoints class. /// Initializes a new instance of the V1Endpoints class.
/// </summary> /// </summary>
/// <param name="subsets">The set of all endpoints is the union of all
/// subsets. Addresses are placed into subsets according to the IPs
/// they share. A single address with multiple ports, some of which are
/// ready and some of which are not (because they come from different
/// containers) will result in the address being displayed in different
/// subsets for the different ports. No address will appear in both
/// Addresses and NotReadyAddresses in the same subset. Sets of
/// addresses and ports that comprise a service.</param>
/// <param name="apiVersion">APIVersion defines the versioned schema of /// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized /// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized /// schemas to the latest internal value, and may reject unrecognized
@@ -60,7 +51,15 @@ namespace k8s.Models
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object's metadata. More info: /// <param name="metadata">Standard object's metadata. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
public V1Endpoints(IList<V1EndpointSubset> subsets, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) /// <param name="subsets">The set of all endpoints is the union of all
/// subsets. Addresses are placed into subsets according to the IPs
/// they share. A single address with multiple ports, some of which are
/// ready and some of which are not (because they come from different
/// containers) will result in the address being displayed in different
/// subsets for the different ports. No address will appear in both
/// Addresses and NotReadyAddresses in the same subset. Sets of
/// addresses and ports that comprise a service.</param>
public V1Endpoints(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), IList<V1EndpointSubset> subsets = default(IList<V1EndpointSubset>))
{ {
ApiVersion = apiVersion; ApiVersion = apiVersion;
Kind = kind; Kind = kind;
@@ -117,15 +116,11 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Validate the object. /// Validate the object.
/// </summary> /// </summary>
/// <exception cref="ValidationException"> /// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails /// Thrown if validation fails
/// </exception> /// </exception>
public virtual void Validate() public virtual void Validate()
{ {
if (Subsets == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Subsets");
}
if (Metadata != null) if (Metadata != null)
{ {
Metadata.Validate(); Metadata.Validate();

View File

@@ -26,7 +26,7 @@ namespace k8s.Models
/// Initializes a new instance of the V1EnvFromSource class. /// Initializes a new instance of the V1EnvFromSource class.
/// </summary> /// </summary>
/// <param name="configMapRef">The ConfigMap to select from</param> /// <param name="configMapRef">The ConfigMap to select from</param>
/// <param name="prefix">An optional identifer to prepend to each key /// <param name="prefix">An optional identifier to prepend to each key
/// in the ConfigMap. Must be a C_IDENTIFIER.</param> /// in the ConfigMap. Must be a C_IDENTIFIER.</param>
/// <param name="secretRef">The Secret to select from</param> /// <param name="secretRef">The Secret to select from</param>
public V1EnvFromSource(V1ConfigMapEnvSource configMapRef = default(V1ConfigMapEnvSource), string prefix = default(string), V1SecretEnvSource secretRef = default(V1SecretEnvSource)) public V1EnvFromSource(V1ConfigMapEnvSource configMapRef = default(V1ConfigMapEnvSource), string prefix = default(string), V1SecretEnvSource secretRef = default(V1SecretEnvSource))
@@ -49,7 +49,7 @@ namespace k8s.Models
public V1ConfigMapEnvSource ConfigMapRef { get; set; } public V1ConfigMapEnvSource ConfigMapRef { get; set; }
/// <summary> /// <summary>
/// Gets or sets an optional identifer to prepend to each key in the /// Gets or sets an optional identifier to prepend to each key in the
/// ConfigMap. Must be a C_IDENTIFIER. /// ConfigMap. Must be a C_IDENTIFIER.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "prefix")] [JsonProperty(PropertyName = "prefix")]

View File

@@ -11,7 +11,7 @@ namespace k8s.Models
/// <summary> /// <summary>
/// EventSeries contain information on series of events, i.e. thing that /// EventSeries contain information on series of events, i.e. thing that
/// was/is happening continously for some time. /// was/is happening continuously for some time.
/// </summary> /// </summary>
public partial class V1EventSeries public partial class V1EventSeries
{ {
@@ -28,7 +28,7 @@ namespace k8s.Models
/// </summary> /// </summary>
/// <param name="count">Number of occurrences in this series up to the /// <param name="count">Number of occurrences in this series up to the
/// last heartbeat time</param> /// last heartbeat time</param>
/// <param name="lastObservedTime">Time of the last occurence /// <param name="lastObservedTime">Time of the last occurrence
/// observed</param> /// observed</param>
/// <param name="state">State of this Series: Ongoing or /// <param name="state">State of this Series: Ongoing or
/// Finished</param> /// Finished</param>
@@ -53,7 +53,7 @@ namespace k8s.Models
public int? Count { get; set; } public int? Count { get; set; }
/// <summary> /// <summary>
/// Gets or sets time of the last occurence observed /// Gets or sets time of the last occurrence observed
/// </summary> /// </summary>
[JsonProperty(PropertyName = "lastObservedTime")] [JsonProperty(PropertyName = "lastObservedTime")]
public System.DateTime? LastObservedTime { get; set; } public System.DateTime? LastObservedTime { get; set; }

View File

@@ -0,0 +1,117 @@
// <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>
/// FlexPersistentVolumeSource represents a generic persistent volume
/// resource that is provisioned/attached using an exec based plugin.
/// </summary>
public partial class V1FlexPersistentVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1FlexPersistentVolumeSource
/// class.
/// </summary>
public V1FlexPersistentVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1FlexPersistentVolumeSource
/// class.
/// </summary>
/// <param name="driver">Driver is the name of the driver to use for
/// this volume.</param>
/// <param name="fsType">Filesystem type to mount. Must be a filesystem
/// type supported by the host operating system. Ex. "ext4", "xfs",
/// "ntfs". The default filesystem depends on FlexVolume
/// script.</param>
/// <param name="options">Optional: Extra command options if
/// any.</param>
/// <param name="readOnlyProperty">Optional: Defaults to false
/// (read/write). ReadOnly here will force the ReadOnly setting in
/// VolumeMounts.</param>
/// <param name="secretRef">Optional: SecretRef is reference to the
/// secret object containing sensitive information to pass to the
/// plugin scripts. This may be empty if no secret object is specified.
/// If the secret object contains more than one secret, all secrets are
/// passed to the plugin scripts.</param>
public V1FlexPersistentVolumeSource(string driver, string fsType = default(string), IDictionary<string, string> options = default(IDictionary<string, string>), bool? readOnlyProperty = default(bool?), V1SecretReference secretRef = default(V1SecretReference))
{
Driver = driver;
FsType = fsType;
Options = options;
ReadOnlyProperty = readOnlyProperty;
SecretRef = secretRef;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets driver is the name of the driver to use for this
/// volume.
/// </summary>
[JsonProperty(PropertyName = "driver")]
public string Driver { get; set; }
/// <summary>
/// Gets or sets filesystem type to mount. Must be a filesystem type
/// supported by the host operating system. Ex. "ext4", "xfs", "ntfs".
/// The default filesystem depends on FlexVolume script.
/// </summary>
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }
/// <summary>
/// Gets or sets optional: Extra command options if any.
/// </summary>
[JsonProperty(PropertyName = "options")]
public IDictionary<string, string> Options { get; set; }
/// <summary>
/// Gets or sets optional: Defaults to false (read/write). ReadOnly
/// here will force the ReadOnly setting in VolumeMounts.
/// </summary>
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Gets or sets optional: SecretRef is reference to the secret object
/// containing sensitive information to pass to the plugin scripts.
/// This may be empty if no secret object is specified. If the secret
/// object contains more than one secret, all secrets are passed to the
/// plugin scripts.
/// </summary>
[JsonProperty(PropertyName = "secretRef")]
public V1SecretReference SecretRef { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Driver == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Driver");
}
}
}
}

View File

@@ -52,7 +52,7 @@ namespace k8s.Models
/// between PV and PVC. More info: /// between PV and PVC. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding</param> /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding</param>
/// <param name="csi">CSI represents storage that handled by an /// <param name="csi">CSI represents storage that handled by an
/// external CSI driver</param> /// external CSI driver (Beta feature).</param>
/// <param name="fc">FC represents a Fibre Channel resource that is /// <param name="fc">FC represents a Fibre Channel resource that is
/// attached to a kubelet's host machine and then exposed to the /// attached to a kubelet's host machine and then exposed to the
/// pod.</param> /// pod.</param>
@@ -88,10 +88,15 @@ namespace k8s.Models
/// <param name="nfs">NFS represents an NFS mount on the host. /// <param name="nfs">NFS represents an NFS mount on the host.
/// Provisioned by an admin. More info: /// Provisioned by an admin. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#nfs</param> /// https://kubernetes.io/docs/concepts/storage/volumes#nfs</param>
/// <param name="nodeAffinity">NodeAffinity defines constraints that
/// limit what nodes this volume can be accessed from. This field
/// influences the scheduling of pods that use this volume.</param>
/// <param name="persistentVolumeReclaimPolicy">What happens to a /// <param name="persistentVolumeReclaimPolicy">What happens to a
/// persistent volume when released from its claim. Valid options are /// persistent volume when released from its claim. Valid options are
/// Retain (default) and Recycle. Recycling must be supported by the /// Retain (default for manually created PersistentVolumes), Delete
/// volume plugin underlying this persistent volume. More info: /// (default for dynamically provisioned PersistentVolumes), and
/// Recycle (deprecated). Recycle must be supported by the volume
/// plugin underlying this PersistentVolume. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming</param> /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming</param>
/// <param name="photonPersistentDisk">PhotonPersistentDisk represents /// <param name="photonPersistentDisk">PhotonPersistentDisk represents
/// a PhotonController persistent disk attached and mounted on kubelets /// a PhotonController persistent disk attached and mounted on kubelets
@@ -118,7 +123,7 @@ namespace k8s.Models
/// This is an alpha feature and may change in the future.</param> /// This is an alpha feature and may change in the future.</param>
/// <param name="vsphereVolume">VsphereVolume represents a vSphere /// <param name="vsphereVolume">VsphereVolume represents a vSphere
/// volume attached and mounted on kubelets host machine</param> /// volume attached and mounted on kubelets host machine</param>
public V1PersistentVolumeSpec(IList<string> accessModes = default(IList<string>), V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore = default(V1AWSElasticBlockStoreVolumeSource), V1AzureDiskVolumeSource azureDisk = default(V1AzureDiskVolumeSource), V1AzureFilePersistentVolumeSource azureFile = default(V1AzureFilePersistentVolumeSource), IDictionary<string, ResourceQuantity> capacity = default(IDictionary<string, ResourceQuantity>), V1CephFSPersistentVolumeSource cephfs = default(V1CephFSPersistentVolumeSource), V1CinderVolumeSource cinder = default(V1CinderVolumeSource), V1ObjectReference claimRef = default(V1ObjectReference), V1CSIPersistentVolumeSource csi = default(V1CSIPersistentVolumeSource), V1FCVolumeSource fc = default(V1FCVolumeSource), V1FlexVolumeSource flexVolume = default(V1FlexVolumeSource), V1FlockerVolumeSource flocker = default(V1FlockerVolumeSource), V1GCEPersistentDiskVolumeSource gcePersistentDisk = default(V1GCEPersistentDiskVolumeSource), V1GlusterfsVolumeSource glusterfs = default(V1GlusterfsVolumeSource), V1HostPathVolumeSource hostPath = default(V1HostPathVolumeSource), V1ISCSIPersistentVolumeSource iscsi = default(V1ISCSIPersistentVolumeSource), V1LocalVolumeSource local = default(V1LocalVolumeSource), IList<string> mountOptions = default(IList<string>), V1NFSVolumeSource nfs = default(V1NFSVolumeSource), string persistentVolumeReclaimPolicy = default(string), V1PhotonPersistentDiskVolumeSource photonPersistentDisk = default(V1PhotonPersistentDiskVolumeSource), V1PortworxVolumeSource portworxVolume = default(V1PortworxVolumeSource), V1QuobyteVolumeSource quobyte = default(V1QuobyteVolumeSource), V1RBDPersistentVolumeSource rbd = default(V1RBDPersistentVolumeSource), V1ScaleIOPersistentVolumeSource scaleIO = default(V1ScaleIOPersistentVolumeSource), string storageClassName = default(string), V1StorageOSPersistentVolumeSource storageos = default(V1StorageOSPersistentVolumeSource), string volumeMode = default(string), V1VsphereVirtualDiskVolumeSource vsphereVolume = default(V1VsphereVirtualDiskVolumeSource)) public V1PersistentVolumeSpec(IList<string> accessModes = default(IList<string>), V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore = default(V1AWSElasticBlockStoreVolumeSource), V1AzureDiskVolumeSource azureDisk = default(V1AzureDiskVolumeSource), V1AzureFilePersistentVolumeSource azureFile = default(V1AzureFilePersistentVolumeSource), IDictionary<string, ResourceQuantity> capacity = default(IDictionary<string, ResourceQuantity>), V1CephFSPersistentVolumeSource cephfs = default(V1CephFSPersistentVolumeSource), V1CinderVolumeSource cinder = default(V1CinderVolumeSource), V1ObjectReference claimRef = default(V1ObjectReference), V1CSIPersistentVolumeSource csi = default(V1CSIPersistentVolumeSource), V1FCVolumeSource fc = default(V1FCVolumeSource), V1FlexPersistentVolumeSource flexVolume = default(V1FlexPersistentVolumeSource), V1FlockerVolumeSource flocker = default(V1FlockerVolumeSource), V1GCEPersistentDiskVolumeSource gcePersistentDisk = default(V1GCEPersistentDiskVolumeSource), V1GlusterfsVolumeSource glusterfs = default(V1GlusterfsVolumeSource), V1HostPathVolumeSource hostPath = default(V1HostPathVolumeSource), V1ISCSIPersistentVolumeSource iscsi = default(V1ISCSIPersistentVolumeSource), V1LocalVolumeSource local = default(V1LocalVolumeSource), IList<string> mountOptions = default(IList<string>), V1NFSVolumeSource nfs = default(V1NFSVolumeSource), V1VolumeNodeAffinity nodeAffinity = default(V1VolumeNodeAffinity), string persistentVolumeReclaimPolicy = default(string), V1PhotonPersistentDiskVolumeSource photonPersistentDisk = default(V1PhotonPersistentDiskVolumeSource), V1PortworxVolumeSource portworxVolume = default(V1PortworxVolumeSource), V1QuobyteVolumeSource quobyte = default(V1QuobyteVolumeSource), V1RBDPersistentVolumeSource rbd = default(V1RBDPersistentVolumeSource), V1ScaleIOPersistentVolumeSource scaleIO = default(V1ScaleIOPersistentVolumeSource), string storageClassName = default(string), V1StorageOSPersistentVolumeSource storageos = default(V1StorageOSPersistentVolumeSource), string volumeMode = default(string), V1VsphereVirtualDiskVolumeSource vsphereVolume = default(V1VsphereVirtualDiskVolumeSource))
{ {
AccessModes = accessModes; AccessModes = accessModes;
AwsElasticBlockStore = awsElasticBlockStore; AwsElasticBlockStore = awsElasticBlockStore;
@@ -139,6 +144,7 @@ namespace k8s.Models
Local = local; Local = local;
MountOptions = mountOptions; MountOptions = mountOptions;
Nfs = nfs; Nfs = nfs;
NodeAffinity = nodeAffinity;
PersistentVolumeReclaimPolicy = persistentVolumeReclaimPolicy; PersistentVolumeReclaimPolicy = persistentVolumeReclaimPolicy;
PhotonPersistentDisk = photonPersistentDisk; PhotonPersistentDisk = photonPersistentDisk;
PortworxVolume = portworxVolume; PortworxVolume = portworxVolume;
@@ -223,7 +229,7 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Gets or sets CSI represents storage that handled by an external CSI /// Gets or sets CSI represents storage that handled by an external CSI
/// driver /// driver (Beta feature).
/// </summary> /// </summary>
[JsonProperty(PropertyName = "csi")] [JsonProperty(PropertyName = "csi")]
public V1CSIPersistentVolumeSource Csi { get; set; } public V1CSIPersistentVolumeSource Csi { get; set; }
@@ -240,7 +246,7 @@ namespace k8s.Models
/// is provisioned/attached using an exec based plugin. /// is provisioned/attached using an exec based plugin.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "flexVolume")] [JsonProperty(PropertyName = "flexVolume")]
public V1FlexVolumeSource FlexVolume { get; set; } public V1FlexPersistentVolumeSource FlexVolume { get; set; }
/// <summary> /// <summary>
/// Gets or sets flocker represents a Flocker volume attached to a /// Gets or sets flocker represents a Flocker volume attached to a
@@ -310,11 +316,21 @@ namespace k8s.Models
[JsonProperty(PropertyName = "nfs")] [JsonProperty(PropertyName = "nfs")]
public V1NFSVolumeSource Nfs { get; set; } public V1NFSVolumeSource Nfs { get; set; }
/// <summary>
/// Gets or sets nodeAffinity defines constraints that limit what nodes
/// this volume can be accessed from. This field influences the
/// scheduling of pods that use this volume.
/// </summary>
[JsonProperty(PropertyName = "nodeAffinity")]
public V1VolumeNodeAffinity NodeAffinity { get; set; }
/// <summary> /// <summary>
/// Gets or sets what happens to a persistent volume when released from /// Gets or sets what happens to a persistent volume when released from
/// its claim. Valid options are Retain (default) and Recycle. /// its claim. Valid options are Retain (default for manually created
/// Recycling must be supported by the volume plugin underlying this /// PersistentVolumes), Delete (default for dynamically provisioned
/// persistent volume. More info: /// PersistentVolumes), and Recycle (deprecated). Recycle must be
/// supported by the volume plugin underlying this PersistentVolume.
/// More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
/// </summary> /// </summary>
[JsonProperty(PropertyName = "persistentVolumeReclaimPolicy")] [JsonProperty(PropertyName = "persistentVolumeReclaimPolicy")]
@@ -449,6 +465,10 @@ namespace k8s.Models
{ {
Nfs.Validate(); Nfs.Validate();
} }
if (NodeAffinity != null)
{
NodeAffinity.Validate();
}
if (PhotonPersistentDisk != null) if (PhotonPersistentDisk != null)
{ {
PhotonPersistentDisk.Validate(); PhotonPersistentDisk.Validate();

View File

@@ -40,6 +40,11 @@ namespace k8s.Models
/// ///
/// If unset, the Kubelet will not modify the ownership and permissions /// If unset, the Kubelet will not modify the ownership and permissions
/// of any volume.</param> /// of any volume.</param>
/// <param name="runAsGroup">The GID to run the entrypoint of the
/// container process. Uses runtime default if unset. May also be set
/// in SecurityContext. If set in both SecurityContext and
/// PodSecurityContext, the value specified in SecurityContext takes
/// precedence for that container.</param>
/// <param name="runAsNonRoot">Indicates that the container must run as /// <param name="runAsNonRoot">Indicates that the container must run as
/// a non-root user. If true, the Kubelet will validate the image at /// a non-root user. If true, the Kubelet will validate the image at
/// runtime to ensure that it does not run as UID 0 (root) and fail to /// runtime to ensure that it does not run as UID 0 (root) and fail to
@@ -62,9 +67,10 @@ namespace k8s.Models
/// first process run in each container, in addition to the container's /// first process run in each container, in addition to the container's
/// primary GID. If unspecified, no groups will be added to any /// primary GID. If unspecified, no groups will be added to any
/// container.</param> /// container.</param>
public V1PodSecurityContext(long? fsGroup = default(long?), bool? runAsNonRoot = default(bool?), long? runAsUser = default(long?), V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions), IList<long?> supplementalGroups = default(IList<long?>)) public V1PodSecurityContext(long? fsGroup = default(long?), long? runAsGroup = default(long?), bool? runAsNonRoot = default(bool?), long? runAsUser = default(long?), V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions), IList<long?> supplementalGroups = default(IList<long?>))
{ {
FsGroup = fsGroup; FsGroup = fsGroup;
RunAsGroup = runAsGroup;
RunAsNonRoot = runAsNonRoot; RunAsNonRoot = runAsNonRoot;
RunAsUser = runAsUser; RunAsUser = runAsUser;
SeLinuxOptions = seLinuxOptions; SeLinuxOptions = seLinuxOptions;
@@ -92,6 +98,16 @@ namespace k8s.Models
[JsonProperty(PropertyName = "fsGroup")] [JsonProperty(PropertyName = "fsGroup")]
public long? FsGroup { get; set; } public long? FsGroup { get; set; }
/// <summary>
/// Gets or sets the GID to run the entrypoint of the container
/// process. Uses runtime default if unset. May also be set in
/// SecurityContext. If set in both SecurityContext and
/// PodSecurityContext, the value specified in SecurityContext takes
/// precedence for that container.
/// </summary>
[JsonProperty(PropertyName = "runAsGroup")]
public long? RunAsGroup { get; set; }
/// <summary> /// <summary>
/// Gets or sets indicates that the container must run as a non-root /// Gets or sets indicates that the container must run as a non-root
/// user. If true, the Kubelet will validate the image at runtime to /// user. If true, the Kubelet will validate the image at runtime to

View File

@@ -43,17 +43,13 @@ namespace k8s.Models
/// mounted.</param> /// mounted.</param>
/// <param name="dnsConfig">Specifies the DNS parameters of a pod. /// <param name="dnsConfig">Specifies the DNS parameters of a pod.
/// Parameters specified here will be merged to the generated DNS /// Parameters specified here will be merged to the generated DNS
/// configuration based on DNSPolicy. This is an alpha feature /// configuration based on DNSPolicy.</param>
/// introduced in v1.9 and CustomPodDNS feature gate must be enabled to
/// use it.</param>
/// <param name="dnsPolicy">Set DNS policy for the pod. Defaults to /// <param name="dnsPolicy">Set DNS policy for the pod. Defaults to
/// "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', /// "ClusterFirst". Valid values are 'ClusterFirstWithHostNet',
/// 'ClusterFirst', 'Default' or 'None'. DNS parameters given in /// 'ClusterFirst', 'Default' or 'None'. DNS parameters given in
/// DNSConfig will be merged with the policy selected with DNSPolicy. /// DNSConfig will be merged with the policy selected with DNSPolicy.
/// To have DNS options set along with hostNetwork, you have to specify /// To have DNS options set along with hostNetwork, you have to specify
/// DNS policy explicitly to 'ClusterFirstWithHostNet'. Note that /// DNS policy explicitly to 'ClusterFirstWithHostNet'.</param>
/// 'None' policy is an alpha feature introduced in v1.9 and
/// CustomPodDNS feature gate must be enabled to use it.</param>
/// <param name="hostAliases">HostAliases is an optional list of hosts /// <param name="hostAliases">HostAliases is an optional list of hosts
/// and IPs that will be injected into the pod's hosts file if /// and IPs that will be injected into the pod's hosts file if
/// specified. This is only valid for non-hostNetwork pods.</param> /// specified. This is only valid for non-hostNetwork pods.</param>
@@ -103,10 +99,12 @@ namespace k8s.Models
/// from PriorityClassName. The higher the value, the higher the /// from PriorityClassName. The higher the value, the higher the
/// priority.</param> /// priority.</param>
/// <param name="priorityClassName">If specified, indicates the pod's /// <param name="priorityClassName">If specified, indicates the pod's
/// priority. "SYSTEM" is a special keyword which indicates the highest /// priority. "system-node-critical" and "system-cluster-critical" are
/// priority. Any other name must be defined by creating a /// two special keywords which indicate the highest priorities with the
/// PriorityClass object with that name. If not specified, the pod /// former being the highest priority. Any other name must be defined
/// priority will be default or zero if there is no default.</param> /// by creating a PriorityClass object with that name. If not
/// specified, the pod priority will be default or zero if there is no
/// default.</param>
/// <param name="restartPolicy">Restart policy for all containers /// <param name="restartPolicy">Restart policy for all containers
/// within the pod. One of Always, OnFailure, Never. Default to Always. /// within the pod. One of Always, OnFailure, Never. Default to Always.
/// More info: /// More info:
@@ -124,6 +122,14 @@ namespace k8s.Models
/// <param name="serviceAccountName">ServiceAccountName is the name of /// <param name="serviceAccountName">ServiceAccountName is the name of
/// the ServiceAccount to use to run this pod. More info: /// the ServiceAccount to use to run this pod. More info:
/// https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/</param> /// https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/</param>
/// <param name="shareProcessNamespace">Share a single process
/// namespace between all of the containers in a pod. When this is set
/// containers will be able to 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.</param>
/// <param name="subdomain">If specified, the fully qualified Pod /// <param name="subdomain">If specified, the fully qualified Pod
/// hostname will be "&lt;hostname&gt;.&lt;subdomain&gt;.&lt;pod /// hostname will be "&lt;hostname&gt;.&lt;subdomain&gt;.&lt;pod
/// namespace&gt;.svc.&lt;cluster domain&gt;". If not specified, the /// namespace&gt;.svc.&lt;cluster domain&gt;". If not specified, the
@@ -142,7 +148,7 @@ namespace k8s.Models
/// <param name="volumes">List of volumes that can be mounted by /// <param name="volumes">List of volumes that can be mounted by
/// containers belonging to the pod. More info: /// containers belonging to the pod. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes</param> /// 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), string restartPolicy = default(string), string schedulerName = default(string), V1PodSecurityContext securityContext = default(V1PodSecurityContext), string serviceAccount = default(string), string serviceAccountName = default(string), 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), 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>))
{ {
ActiveDeadlineSeconds = activeDeadlineSeconds; ActiveDeadlineSeconds = activeDeadlineSeconds;
Affinity = affinity; Affinity = affinity;
@@ -166,6 +172,7 @@ namespace k8s.Models
SecurityContext = securityContext; SecurityContext = securityContext;
ServiceAccount = serviceAccount; ServiceAccount = serviceAccount;
ServiceAccountName = serviceAccountName; ServiceAccountName = serviceAccountName;
ShareProcessNamespace = shareProcessNamespace;
Subdomain = subdomain; Subdomain = subdomain;
TerminationGracePeriodSeconds = terminationGracePeriodSeconds; TerminationGracePeriodSeconds = terminationGracePeriodSeconds;
Tolerations = tolerations; Tolerations = tolerations;
@@ -211,8 +218,7 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Gets or sets specifies the DNS parameters of a pod. Parameters /// Gets or sets specifies the DNS parameters of a pod. Parameters
/// specified here will be merged to the generated DNS configuration /// specified here will be merged to the generated DNS configuration
/// based on DNSPolicy. This is an alpha feature introduced in v1.9 and /// based on DNSPolicy.
/// CustomPodDNS feature gate must be enabled to use it.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "dnsConfig")] [JsonProperty(PropertyName = "dnsConfig")]
public V1PodDNSConfig DnsConfig { get; set; } public V1PodDNSConfig DnsConfig { get; set; }
@@ -223,9 +229,7 @@ namespace k8s.Models
/// 'ClusterFirst', 'Default' or 'None'. DNS parameters given in /// 'ClusterFirst', 'Default' or 'None'. DNS parameters given in
/// DNSConfig will be merged with the policy selected with DNSPolicy. /// DNSConfig will be merged with the policy selected with DNSPolicy.
/// To have DNS options set along with hostNetwork, you have to specify /// To have DNS options set along with hostNetwork, you have to specify
/// DNS policy explicitly to 'ClusterFirstWithHostNet'. Note that /// DNS policy explicitly to 'ClusterFirstWithHostNet'.
/// 'None' policy is an alpha feature introduced in v1.9 and
/// CustomPodDNS feature gate must be enabled to use it.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "dnsPolicy")] [JsonProperty(PropertyName = "dnsPolicy")]
public string DnsPolicy { get; set; } public string DnsPolicy { get; set; }
@@ -327,11 +331,13 @@ namespace k8s.Models
public int? Priority { get; set; } public int? Priority { get; set; }
/// <summary> /// <summary>
/// Gets or sets if specified, indicates the pod's priority. "SYSTEM" /// Gets or sets if specified, indicates the pod's priority.
/// is a special keyword which indicates the highest priority. Any /// "system-node-critical" and "system-cluster-critical" are two
/// other name must be defined by creating a PriorityClass object with /// special keywords which indicate the highest priorities with the
/// that name. If not specified, the pod priority will be default or /// former being the highest priority. Any other name must be defined
/// zero if there is no default. /// by creating a PriorityClass object with that name. If not
/// specified, the pod priority will be default or zero if there is no
/// default.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "priorityClassName")] [JsonProperty(PropertyName = "priorityClassName")]
public string PriorityClassName { get; set; } public string PriorityClassName { get; set; }
@@ -375,6 +381,18 @@ namespace k8s.Models
[JsonProperty(PropertyName = "serviceAccountName")] [JsonProperty(PropertyName = "serviceAccountName")]
public string ServiceAccountName { get; set; } public string ServiceAccountName { get; set; }
/// <summary>
/// Gets or sets share a single process namespace between all of the
/// containers in a pod. When this is set containers will be able to
/// 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.
/// </summary>
[JsonProperty(PropertyName = "shareProcessNamespace")]
public bool? ShareProcessNamespace { get; set; }
/// <summary> /// <summary>
/// Gets or sets if specified, the fully qualified Pod hostname will be /// Gets or sets if specified, the fully qualified Pod hostname will be
/// "&amp;lt;hostname&amp;gt;.&amp;lt;subdomain&amp;gt;.&amp;lt;pod /// "&amp;lt;hostname&amp;gt;.&amp;lt;subdomain&amp;gt;.&amp;lt;pod

View File

@@ -43,6 +43,16 @@ namespace k8s.Models
/// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status</param> /// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status</param>
/// <param name="message">A human readable message indicating details /// <param name="message">A human readable message indicating details
/// about why the pod is in this condition.</param> /// about why the pod is in this condition.</param>
/// <param name="nominatedNodeName">nominatedNodeName is set only when
/// this pod preempts other pods on the node, but it cannot be
/// scheduled right away as preemption victims receive their graceful
/// termination periods. This field does not guarantee that the pod
/// will be scheduled on this node. Scheduler may decide to place the
/// pod elsewhere if other nodes become available sooner. Scheduler may
/// also decide to give the resources on this node to a higher priority
/// pod that is created after preemption. As a result, this field may
/// be different than PodSpec.nodeName when the pod is
/// scheduled.</param>
/// <param name="phase">Current condition of the pod. More info: /// <param name="phase">Current condition of the pod. More info:
/// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase</param> /// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase</param>
/// <param name="podIP">IP address allocated to the pod. Routable at /// <param name="podIP">IP address allocated to the pod. Routable at
@@ -50,19 +60,20 @@ namespace k8s.Models
/// <param name="qosClass">The Quality of Service (QOS) classification /// <param name="qosClass">The Quality of Service (QOS) classification
/// assigned to the pod based on resource requirements See PodQOSClass /// assigned to the pod based on resource requirements See PodQOSClass
/// type for available QOS classes More info: /// type for available QOS classes More info:
/// https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md</param> /// https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md</param>
/// <param name="reason">A brief CamelCase message indicating details /// <param name="reason">A brief CamelCase message indicating details
/// about why the pod is in this state. e.g. 'Evicted'</param> /// about why the pod is in this state. e.g. 'Evicted'</param>
/// <param name="startTime">RFC 3339 date and time at which the object /// <param name="startTime">RFC 3339 date and time at which the object
/// was acknowledged by the Kubelet. This is before the Kubelet pulled /// was acknowledged by the Kubelet. This is before the Kubelet pulled
/// the container image(s) for the pod.</param> /// the container image(s) for the pod.</param>
public V1PodStatus(IList<V1PodCondition> conditions = default(IList<V1PodCondition>), IList<V1ContainerStatus> containerStatuses = default(IList<V1ContainerStatus>), string hostIP = default(string), IList<V1ContainerStatus> initContainerStatuses = default(IList<V1ContainerStatus>), string message = default(string), string phase = default(string), string podIP = default(string), string qosClass = default(string), string reason = default(string), System.DateTime? startTime = default(System.DateTime?)) public V1PodStatus(IList<V1PodCondition> conditions = default(IList<V1PodCondition>), IList<V1ContainerStatus> containerStatuses = default(IList<V1ContainerStatus>), string hostIP = default(string), IList<V1ContainerStatus> initContainerStatuses = default(IList<V1ContainerStatus>), string message = default(string), string nominatedNodeName = default(string), string phase = default(string), string podIP = default(string), string qosClass = default(string), string reason = default(string), System.DateTime? startTime = default(System.DateTime?))
{ {
Conditions = conditions; Conditions = conditions;
ContainerStatuses = containerStatuses; ContainerStatuses = containerStatuses;
HostIP = hostIP; HostIP = hostIP;
InitContainerStatuses = initContainerStatuses; InitContainerStatuses = initContainerStatuses;
Message = message; Message = message;
NominatedNodeName = nominatedNodeName;
Phase = phase; Phase = phase;
PodIP = podIP; PodIP = podIP;
QosClass = qosClass; QosClass = qosClass;
@@ -115,6 +126,20 @@ namespace k8s.Models
[JsonProperty(PropertyName = "message")] [JsonProperty(PropertyName = "message")]
public string Message { get; set; } public string Message { get; set; }
/// <summary>
/// Gets or sets nominatedNodeName is set only when this pod preempts
/// other pods on the node, but it cannot be scheduled right away as
/// preemption victims receive their graceful termination periods. This
/// field does not guarantee that the pod will be scheduled on this
/// node. Scheduler may decide to place the pod elsewhere if other
/// nodes become available sooner. Scheduler may also decide to give
/// the resources on this node to a higher priority pod that is created
/// after preemption. As a result, this field may be different than
/// PodSpec.nodeName when the pod is scheduled.
/// </summary>
[JsonProperty(PropertyName = "nominatedNodeName")]
public string NominatedNodeName { get; set; }
/// <summary> /// <summary>
/// Gets or sets current condition of the pod. More info: /// Gets or sets current condition of the pod. More info:
/// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase /// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
@@ -133,7 +158,7 @@ namespace k8s.Models
/// Gets or sets the Quality of Service (QOS) classification assigned /// Gets or sets the Quality of Service (QOS) classification assigned
/// to the pod based on resource requirements See PodQOSClass type for /// to the pod based on resource requirements See PodQOSClass type for
/// available QOS classes More info: /// available QOS classes More info:
/// https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md /// https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md
/// </summary> /// </summary>
[JsonProperty(PropertyName = "qosClass")] [JsonProperty(PropertyName = "qosClass")]
public string QosClass { get; set; } public string QosClass { get; set; }

View File

@@ -35,7 +35,7 @@ namespace k8s.Models
/// number of old and new pods do not exceed 130% of desired pods. Once /// number of old and new pods do not exceed 130% of desired pods. Once
/// old pods have been killed, new RC can be scaled up further, /// old pods have been killed, new RC can be scaled up further,
/// ensuring that total number of pods running at any time during the /// ensuring that total number of pods running at any time during the
/// update is atmost 130% of desired pods.</param> /// update is at most 130% of desired pods.</param>
/// <param name="maxUnavailable">The maximum number of pods that can be /// <param name="maxUnavailable">The maximum number of pods that can be
/// unavailable during the update. Value can be an absolute number (ex: /// unavailable during the update. Value can be an absolute number (ex:
/// 5) or a percentage of desired pods (ex: 10%). Absolute number is /// 5) or a percentage of desired pods (ex: 10%). Absolute number is
@@ -68,7 +68,7 @@ namespace k8s.Models
/// starts, such that the total number of old and new pods do not /// starts, such that the total number of old and new pods do not
/// exceed 130% of desired pods. Once old pods have been killed, new RC /// exceed 130% of desired pods. Once old pods have been killed, new RC
/// can be scaled up further, ensuring that total number of pods /// can be scaled up further, ensuring that total number of pods
/// running at any time during the update is atmost 130% of desired /// running at any time during the update is at most 130% of desired
/// pods. /// pods.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "maxSurge")] [JsonProperty(PropertyName = "maxSurge")]

View File

@@ -42,6 +42,11 @@ namespace k8s.Models
/// root on the host. Defaults to false.</param> /// root on the host. Defaults to false.</param>
/// <param name="readOnlyRootFilesystem">Whether this container has a /// <param name="readOnlyRootFilesystem">Whether this container has a
/// read-only root filesystem. Default is false.</param> /// read-only root filesystem. Default is false.</param>
/// <param name="runAsGroup">The GID to run the entrypoint of the
/// container process. Uses runtime default if unset. May also be set
/// in PodSecurityContext. If set in both SecurityContext and
/// PodSecurityContext, the value specified in SecurityContext takes
/// precedence.</param>
/// <param name="runAsNonRoot">Indicates that the container must run as /// <param name="runAsNonRoot">Indicates that the container must run as
/// a non-root user. If true, the Kubelet will validate the image at /// a non-root user. If true, the Kubelet will validate the image at
/// runtime to ensure that it does not run as UID 0 (root) and fail to /// runtime to ensure that it does not run as UID 0 (root) and fail to
@@ -61,12 +66,13 @@ namespace k8s.Models
/// PodSecurityContext. If set in both SecurityContext and /// PodSecurityContext. If set in both SecurityContext and
/// PodSecurityContext, the value specified in SecurityContext takes /// PodSecurityContext, the value specified in SecurityContext takes
/// precedence.</param> /// precedence.</param>
public V1SecurityContext(bool? allowPrivilegeEscalation = default(bool?), V1Capabilities capabilities = default(V1Capabilities), bool? privileged = default(bool?), bool? readOnlyRootFilesystem = default(bool?), 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?), bool? readOnlyRootFilesystem = default(bool?), long? runAsGroup = default(long?), bool? runAsNonRoot = default(bool?), long? runAsUser = default(long?), V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions))
{ {
AllowPrivilegeEscalation = allowPrivilegeEscalation; AllowPrivilegeEscalation = allowPrivilegeEscalation;
Capabilities = capabilities; Capabilities = capabilities;
Privileged = privileged; Privileged = privileged;
ReadOnlyRootFilesystem = readOnlyRootFilesystem; ReadOnlyRootFilesystem = readOnlyRootFilesystem;
RunAsGroup = runAsGroup;
RunAsNonRoot = runAsNonRoot; RunAsNonRoot = runAsNonRoot;
RunAsUser = runAsUser; RunAsUser = runAsUser;
SeLinuxOptions = seLinuxOptions; SeLinuxOptions = seLinuxOptions;
@@ -111,6 +117,16 @@ namespace k8s.Models
[JsonProperty(PropertyName = "readOnlyRootFilesystem")] [JsonProperty(PropertyName = "readOnlyRootFilesystem")]
public bool? ReadOnlyRootFilesystem { get; set; } public bool? ReadOnlyRootFilesystem { get; set; }
/// <summary>
/// Gets or sets the GID to run the entrypoint of the container
/// process. Uses runtime default if unset. May also be set in
/// PodSecurityContext. If set in both SecurityContext and
/// PodSecurityContext, the value specified in SecurityContext takes
/// precedence.
/// </summary>
[JsonProperty(PropertyName = "runAsGroup")]
public long? RunAsGroup { get; set; }
/// <summary> /// <summary>
/// Gets or sets indicates that the container must run as a non-root /// Gets or sets indicates that the container must run as a non-root
/// user. If true, the Kubelet will validate the image at runtime to /// user. If true, the Kubelet will validate the image at runtime to

View File

@@ -0,0 +1,56 @@
// <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>
/// ServiceReference holds a reference to Service.legacy.k8s.io
/// </summary>
public partial class V1ServiceReference
{
/// <summary>
/// Initializes a new instance of the V1ServiceReference class.
/// </summary>
public V1ServiceReference()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ServiceReference class.
/// </summary>
/// <param name="name">Name is the name of the service</param>
/// <param name="namespaceProperty">Namespace is the namespace of the
/// service</param>
public V1ServiceReference(string name = default(string), string namespaceProperty = default(string))
{
Name = name;
NamespaceProperty = namespaceProperty;
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 service
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets namespace is the namespace of the service
/// </summary>
[JsonProperty(PropertyName = "namespace")]
public string NamespaceProperty { get; set; }
}
}

View File

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

View File

@@ -0,0 +1,63 @@
// <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>
/// VolumeNodeAffinity defines constraints that limit what nodes this
/// volume can be accessed from.
/// </summary>
public partial class V1VolumeNodeAffinity
{
/// <summary>
/// Initializes a new instance of the V1VolumeNodeAffinity class.
/// </summary>
public V1VolumeNodeAffinity()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1VolumeNodeAffinity class.
/// </summary>
/// <param name="required">Required specifies hard node constraints
/// that must be met.</param>
public V1VolumeNodeAffinity(V1NodeSelector required = default(V1NodeSelector))
{
Required = required;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets required specifies hard node constraints that must be
/// met.
/// </summary>
[JsonProperty(PropertyName = "required")]
public V1NodeSelector Required { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Required != null)
{
Required.Validate();
}
}
}
}

View File

@@ -39,14 +39,18 @@ namespace k8s.Models
/// used.</param> /// used.</param>
/// <param name="globalDefault">globalDefault specifies whether this /// <param name="globalDefault">globalDefault specifies whether this
/// PriorityClass should be considered as the default priority for pods /// PriorityClass should be considered as the default priority for pods
/// that do not have any priority class.</param> /// that do not have any priority class. Only one PriorityClass can be
/// marked as `globalDefault`. However, if more than one
/// PriorityClasses exists with their `globalDefault` field set to
/// true, the smallest value of such global default PriorityClasses
/// will be used as the default priority.</param>
/// <param name="kind">Kind is a string value representing the REST /// <param name="kind">Kind is a string value representing the REST
/// resource this object represents. Servers may infer this from the /// resource this object represents. Servers may infer this from the
/// endpoint the client submits requests to. Cannot be updated. In /// endpoint the client submits requests to. Cannot be updated. In
/// CamelCase. More info: /// CamelCase. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object's metadata. More info: /// <param name="metadata">Standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
public V1alpha1PriorityClass(int value, string apiVersion = default(string), string description = default(string), bool? globalDefault = default(bool?), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) public V1alpha1PriorityClass(int value, string apiVersion = default(string), string description = default(string), bool? globalDefault = default(bool?), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta))
{ {
ApiVersion = apiVersion; ApiVersion = apiVersion;
@@ -83,7 +87,11 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Gets or sets globalDefault specifies whether this PriorityClass /// Gets or sets globalDefault specifies whether this PriorityClass
/// should be considered as the default priority for pods that do not /// should be considered as the default priority for pods that do not
/// have any priority class. /// have any priority class. Only one PriorityClass can be marked as
/// `globalDefault`. However, if more than one PriorityClasses exists
/// with their `globalDefault` field set to true, the smallest value of
/// such global default PriorityClasses will be used as the default
/// priority.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "globalDefault")] [JsonProperty(PropertyName = "globalDefault")]
public bool? GlobalDefault { get; set; } public bool? GlobalDefault { get; set; }
@@ -100,7 +108,7 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Gets or sets standard object's metadata. More info: /// Gets or sets standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata /// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
/// </summary> /// </summary>
[JsonProperty(PropertyName = "metadata")] [JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; } public V1ObjectMeta Metadata { get; set; }

View File

@@ -40,7 +40,7 @@ namespace k8s.Models
/// CamelCase. More info: /// CamelCase. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard list metadata More info: /// <param name="metadata">Standard list metadata More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</param> /// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
public V1alpha1PriorityClassList(IList<V1alpha1PriorityClass> items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) public V1alpha1PriorityClassList(IList<V1alpha1PriorityClass> items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta))
{ {
ApiVersion = apiVersion; ApiVersion = apiVersion;
@@ -83,7 +83,7 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Gets or sets standard list metadata More info: /// Gets or sets standard list metadata More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata /// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
/// </summary> /// </summary>
[JsonProperty(PropertyName = "metadata")] [JsonProperty(PropertyName = "metadata")]
public V1ListMeta Metadata { get; set; } public V1ListMeta Metadata { get; set; }

View File

@@ -37,6 +37,8 @@ namespace k8s.Models
/// serve. It must match the name of the /// serve. It must match the name of the
/// CustomResourceDefinition-registration too: plural.group and it must /// CustomResourceDefinition-registration too: plural.group and it must
/// be all lowercase.</param> /// be all lowercase.</param>
/// <param name="categories">Categories is a list of grouped resources
/// custom resources belong to (e.g. 'all')</param>
/// <param name="listKind">ListKind is the serialized kind of the list /// <param name="listKind">ListKind is the serialized kind of the list
/// for this resource. Defaults to &lt;kind&gt;List.</param> /// for this resource. Defaults to &lt;kind&gt;List.</param>
/// <param name="shortNames">ShortNames are short names for the /// <param name="shortNames">ShortNames are short names for the
@@ -44,8 +46,9 @@ namespace k8s.Models
/// <param name="singular">Singular is the singular name of the /// <param name="singular">Singular is the singular name of the
/// resource. It must be all lowercase Defaults to lowercased /// resource. It must be all lowercase Defaults to lowercased
/// &lt;kind&gt;</param> /// &lt;kind&gt;</param>
public V1beta1CustomResourceDefinitionNames(string kind, string plural, string listKind = default(string), IList<string> shortNames = default(IList<string>), string singular = default(string)) public V1beta1CustomResourceDefinitionNames(string kind, string plural, IList<string> categories = default(IList<string>), string listKind = default(string), IList<string> shortNames = default(IList<string>), string singular = default(string))
{ {
Categories = categories;
Kind = kind; Kind = kind;
ListKind = listKind; ListKind = listKind;
Plural = plural; Plural = plural;
@@ -59,6 +62,13 @@ namespace k8s.Models
/// </summary> /// </summary>
partial void CustomInit(); partial void CustomInit();
/// <summary>
/// Gets or sets categories is a list of grouped resources custom
/// resources belong to (e.g. 'all')
/// </summary>
[JsonProperty(PropertyName = "categories")]
public IList<string> Categories { get; set; }
/// <summary> /// <summary>
/// Gets or sets kind is the serialized kind of the resource. It is /// Gets or sets kind is the serialized kind of the resource. It is
/// normally CamelCase and singular. /// normally CamelCase and singular.

View File

@@ -37,13 +37,18 @@ namespace k8s.Models
/// cluster or namespace scoped. Default is namespaced</param> /// cluster or namespace scoped. Default is namespaced</param>
/// <param name="version">Version is the version this resource belongs /// <param name="version">Version is the version this resource belongs
/// in</param> /// in</param>
/// <param name="subresources">Subresources describes the subresources
/// for CustomResources This field is alpha-level and should only be
/// sent to servers that enable subresources via the
/// CustomResourceSubresources feature gate.</param>
/// <param name="validation">Validation describes the validation /// <param name="validation">Validation describes the validation
/// methods for CustomResources</param> /// methods for CustomResources</param>
public V1beta1CustomResourceDefinitionSpec(string group, V1beta1CustomResourceDefinitionNames names, string scope, string version, V1beta1CustomResourceValidation validation = default(V1beta1CustomResourceValidation)) public V1beta1CustomResourceDefinitionSpec(string group, V1beta1CustomResourceDefinitionNames names, string scope, string version, V1beta1CustomResourceSubresources subresources = default(V1beta1CustomResourceSubresources), V1beta1CustomResourceValidation validation = default(V1beta1CustomResourceValidation))
{ {
Group = group; Group = group;
Names = names; Names = names;
Scope = scope; Scope = scope;
Subresources = subresources;
Validation = validation; Validation = validation;
Version = version; Version = version;
CustomInit(); CustomInit();
@@ -74,6 +79,15 @@ namespace k8s.Models
[JsonProperty(PropertyName = "scope")] [JsonProperty(PropertyName = "scope")]
public string Scope { get; set; } public string Scope { get; set; }
/// <summary>
/// Gets or sets subresources describes the subresources for
/// CustomResources This field is alpha-level and should only be sent
/// to servers that enable subresources via the
/// CustomResourceSubresources feature gate.
/// </summary>
[JsonProperty(PropertyName = "subresources")]
public V1beta1CustomResourceSubresources Subresources { get; set; }
/// <summary> /// <summary>
/// Gets or sets validation describes the validation methods for /// Gets or sets validation describes the validation methods for
/// CustomResources /// CustomResources
@@ -115,6 +129,10 @@ namespace k8s.Models
{ {
Names.Validate(); Names.Validate();
} }
if (Subresources != null)
{
Subresources.Validate();
}
if (Validation != null) if (Validation != null)
{ {
Validation.Validate(); Validation.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.Linq;
/// <summary>
/// CustomResourceSubresourceScale defines how to serve the scale
/// subresource for CustomResources.
/// </summary>
public partial class V1beta1CustomResourceSubresourceScale
{
/// <summary>
/// Initializes a new instance of the
/// V1beta1CustomResourceSubresourceScale class.
/// </summary>
public V1beta1CustomResourceSubresourceScale()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// V1beta1CustomResourceSubresourceScale class.
/// </summary>
/// <param name="specReplicasPath">SpecReplicasPath defines the JSON
/// path inside of a CustomResource that corresponds to
/// Scale.Spec.Replicas. Only JSON paths without the array notation are
/// allowed. Must be a JSON Path under .spec. If there is no value
/// under the given path in the CustomResource, the /scale subresource
/// will return an error on GET.</param>
/// <param name="statusReplicasPath">StatusReplicasPath defines the
/// JSON path inside of a CustomResource that corresponds to
/// Scale.Status.Replicas. Only JSON paths without the array notation
/// are allowed. Must be a JSON Path under .status. If there is no
/// value under the given path in the CustomResource, the status
/// replica value in the /scale subresource will default to 0.</param>
/// <param name="labelSelectorPath">LabelSelectorPath defines the JSON
/// path inside of a CustomResource that corresponds to
/// Scale.Status.Selector. Only JSON paths without the array notation
/// are allowed. Must be a JSON Path under .status. Must be set to work
/// with HPA. If there is no value under the given path in the
/// CustomResource, the status label selector value in the /scale
/// subresource will default to the empty string.</param>
public V1beta1CustomResourceSubresourceScale(string specReplicasPath, string statusReplicasPath, string labelSelectorPath = default(string))
{
LabelSelectorPath = labelSelectorPath;
SpecReplicasPath = specReplicasPath;
StatusReplicasPath = statusReplicasPath;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets labelSelectorPath defines the JSON path inside of a
/// CustomResource that corresponds to Scale.Status.Selector. Only JSON
/// paths without the array notation are allowed. Must be a JSON Path
/// under .status. Must be set to work with HPA. If there is no value
/// under the given path in the CustomResource, the status label
/// selector value in the /scale subresource will default to the empty
/// string.
/// </summary>
[JsonProperty(PropertyName = "labelSelectorPath")]
public string LabelSelectorPath { get; set; }
/// <summary>
/// Gets or sets specReplicasPath defines the JSON path inside of a
/// CustomResource that corresponds to Scale.Spec.Replicas. Only JSON
/// paths without the array notation are allowed. Must be a JSON Path
/// under .spec. If there is no value under the given path in the
/// CustomResource, the /scale subresource will return an error on GET.
/// </summary>
[JsonProperty(PropertyName = "specReplicasPath")]
public string SpecReplicasPath { get; set; }
/// <summary>
/// Gets or sets statusReplicasPath defines the JSON path inside of a
/// CustomResource that corresponds to Scale.Status.Replicas. Only JSON
/// paths without the array notation are allowed. Must be a JSON Path
/// under .status. If there is no value under the given path in the
/// CustomResource, the status replica value in the /scale subresource
/// will default to 0.
/// </summary>
[JsonProperty(PropertyName = "statusReplicasPath")]
public string StatusReplicasPath { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (SpecReplicasPath == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "SpecReplicasPath");
}
if (StatusReplicasPath == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "StatusReplicasPath");
}
}
}
}

View File

@@ -0,0 +1,75 @@
// <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>
/// CustomResourceSubresources defines the status and scale subresources
/// for CustomResources.
/// </summary>
public partial class V1beta1CustomResourceSubresources
{
/// <summary>
/// Initializes a new instance of the V1beta1CustomResourceSubresources
/// class.
/// </summary>
public V1beta1CustomResourceSubresources()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1CustomResourceSubresources
/// class.
/// </summary>
/// <param name="scale">Scale denotes the scale subresource for
/// CustomResources</param>
/// <param name="status">Status denotes the status subresource for
/// CustomResources</param>
public V1beta1CustomResourceSubresources(V1beta1CustomResourceSubresourceScale scale = default(V1beta1CustomResourceSubresourceScale), object status = default(object))
{
Scale = scale;
Status = status;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets scale denotes the scale subresource for
/// CustomResources
/// </summary>
[JsonProperty(PropertyName = "scale")]
public V1beta1CustomResourceSubresourceScale Scale { get; set; }
/// <summary>
/// Gets or sets status denotes the status subresource for
/// CustomResources
/// </summary>
[JsonProperty(PropertyName = "status")]
public object Status { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Scale != null)
{
Scale.Validate();
}
}
}
}

View File

@@ -12,7 +12,7 @@ namespace k8s.Models
/// <summary> /// <summary>
/// EventSeries contain information on series of events, i.e. thing that /// EventSeries contain information on series of events, i.e. thing that
/// was/is happening continously for some time. /// was/is happening continuously for some time.
/// </summary> /// </summary>
public partial class V1beta1EventSeries public partial class V1beta1EventSeries
{ {

View File

@@ -0,0 +1,132 @@
// <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>
/// VolumeAttachment captures the intent to attach or detach the specified
/// volume to/from the specified node.
///
/// VolumeAttachment objects are non-namespaced.
/// </summary>
public partial class V1beta1VolumeAttachment
{
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachment class.
/// </summary>
public V1beta1VolumeAttachment()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachment class.
/// </summary>
/// <param name="spec">Specification of the desired attach/detach
/// volume behavior. Populated by the Kubernetes system.</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 object metadata. More info:
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata</param>
/// <param name="status">Status of the VolumeAttachment request.
/// Populated by the entity completing the attach or detach operation,
/// i.e. the external-attacher.</param>
public V1beta1VolumeAttachment(V1beta1VolumeAttachmentSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1VolumeAttachmentStatus status = default(V1beta1VolumeAttachmentStatus))
{
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 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 specification of the desired attach/detach volume
/// behavior. Populated by the Kubernetes system.
/// </summary>
[JsonProperty(PropertyName = "spec")]
public V1beta1VolumeAttachmentSpec Spec { get; set; }
/// <summary>
/// Gets or sets status of the VolumeAttachment request. Populated by
/// the entity completing the attach or detach operation, i.e. the
/// external-attacher.
/// </summary>
[JsonProperty(PropertyName = "status")]
public V1beta1VolumeAttachmentStatus Status { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <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();
}
if (Spec != null)
{
Spec.Validate();
}
if (Status != null)
{
Status.Validate();
}
}
}
}

View File

@@ -0,0 +1,117 @@
// <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>
/// VolumeAttachmentList is a collection of VolumeAttachment objects.
/// </summary>
public partial class V1beta1VolumeAttachmentList
{
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachmentList
/// class.
/// </summary>
public V1beta1VolumeAttachmentList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachmentList
/// class.
/// </summary>
/// <param name="items">Items is the list of VolumeAttachments</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 V1beta1VolumeAttachmentList(IList<V1beta1VolumeAttachment> 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 VolumeAttachments
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1beta1VolumeAttachment> 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,53 @@
// <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>
/// VolumeAttachmentSource represents a volume that should be attached.
/// Right now only PersistenVolumes can be attached via external attacher,
/// in future we may allow also inline volumes in pods. Exactly one member
/// can be set.
/// </summary>
public partial class V1beta1VolumeAttachmentSource
{
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachmentSource
/// class.
/// </summary>
public V1beta1VolumeAttachmentSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachmentSource
/// class.
/// </summary>
/// <param name="persistentVolumeName">Name of the persistent volume to
/// attach.</param>
public V1beta1VolumeAttachmentSource(string persistentVolumeName = default(string))
{
PersistentVolumeName = persistentVolumeName;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets name of the persistent volume to attach.
/// </summary>
[JsonProperty(PropertyName = "persistentVolumeName")]
public string PersistentVolumeName { get; set; }
}
}

View File

@@ -0,0 +1,94 @@
// <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>
/// VolumeAttachmentSpec is the specification of a VolumeAttachment
/// request.
/// </summary>
public partial class V1beta1VolumeAttachmentSpec
{
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachmentSpec
/// class.
/// </summary>
public V1beta1VolumeAttachmentSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachmentSpec
/// class.
/// </summary>
/// <param name="attacher">Attacher indicates the name of the volume
/// driver that MUST handle this request. This is the name returned by
/// GetPluginName().</param>
/// <param name="nodeName">The node that the volume should be attached
/// to.</param>
/// <param name="source">Source represents the volume that should be
/// attached.</param>
public V1beta1VolumeAttachmentSpec(string attacher, string nodeName, V1beta1VolumeAttachmentSource source)
{
Attacher = attacher;
NodeName = nodeName;
Source = source;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets attacher indicates the name of the volume driver that
/// MUST handle this request. This is the name returned by
/// GetPluginName().
/// </summary>
[JsonProperty(PropertyName = "attacher")]
public string Attacher { get; set; }
/// <summary>
/// Gets or sets the node that the volume should be attached to.
/// </summary>
[JsonProperty(PropertyName = "nodeName")]
public string NodeName { get; set; }
/// <summary>
/// Gets or sets source represents the volume that should be attached.
/// </summary>
[JsonProperty(PropertyName = "source")]
public V1beta1VolumeAttachmentSource Source { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Attacher == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Attacher");
}
if (NodeName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "NodeName");
}
if (Source == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Source");
}
}
}
}

View File

@@ -0,0 +1,106 @@
// <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.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// VolumeAttachmentStatus is the status of a VolumeAttachment request.
/// </summary>
public partial class V1beta1VolumeAttachmentStatus
{
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachmentStatus
/// class.
/// </summary>
public V1beta1VolumeAttachmentStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1VolumeAttachmentStatus
/// class.
/// </summary>
/// <param name="attached">Indicates the volume is successfully
/// attached. This field must only be set by the entity completing the
/// attach operation, i.e. the external-attacher.</param>
/// <param name="attachError">The last error encountered during attach
/// operation, if any. This field must only be set by the entity
/// completing the attach operation, i.e. the
/// external-attacher.</param>
/// <param name="attachmentMetadata">Upon successful attach, this field
/// is populated with any information returned by the attach operation
/// that must be passed into subsequent WaitForAttach or Mount calls.
/// This field must only be set by the entity completing the attach
/// operation, i.e. the external-attacher.</param>
/// <param name="detachError">The last error encountered during detach
/// operation, if any. This field must only be set by the entity
/// completing the detach operation, i.e. the
/// external-attacher.</param>
public V1beta1VolumeAttachmentStatus(bool attached, V1beta1VolumeError attachError = default(V1beta1VolumeError), IDictionary<string, string> attachmentMetadata = default(IDictionary<string, string>), V1beta1VolumeError detachError = default(V1beta1VolumeError))
{
AttachError = attachError;
Attached = attached;
AttachmentMetadata = attachmentMetadata;
DetachError = detachError;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the last error encountered during attach operation, if
/// any. This field must only be set by the entity completing the
/// attach operation, i.e. the external-attacher.
/// </summary>
[JsonProperty(PropertyName = "attachError")]
public V1beta1VolumeError AttachError { get; set; }
/// <summary>
/// Gets or sets indicates the volume is successfully attached. This
/// field must only be set by the entity completing the attach
/// operation, i.e. the external-attacher.
/// </summary>
[JsonProperty(PropertyName = "attached")]
public bool Attached { get; set; }
/// <summary>
/// Gets or sets upon successful attach, this field is populated with
/// any information returned by the attach operation that must be
/// passed into subsequent WaitForAttach or Mount calls. This field
/// must only be set by the entity completing the attach operation,
/// i.e. the external-attacher.
/// </summary>
[JsonProperty(PropertyName = "attachmentMetadata")]
public IDictionary<string, string> AttachmentMetadata { get; set; }
/// <summary>
/// Gets or sets the last error encountered during detach operation, if
/// any. This field must only be set by the entity completing the
/// detach operation, i.e. the external-attacher.
/// </summary>
[JsonProperty(PropertyName = "detachError")]
public V1beta1VolumeError DetachError { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
}
}
}

View File

@@ -0,0 +1,59 @@
// <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>
/// VolumeError captures an error encountered during a volume operation.
/// </summary>
public partial class V1beta1VolumeError
{
/// <summary>
/// Initializes a new instance of the V1beta1VolumeError class.
/// </summary>
public V1beta1VolumeError()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1VolumeError class.
/// </summary>
/// <param name="message">String detailing the error encountered during
/// Attach or Detach operation. This string maybe logged, so it should
/// not contain sensitive information.</param>
/// <param name="time">Time the error was encountered.</param>
public V1beta1VolumeError(string message = default(string), System.DateTime? time = default(System.DateTime?))
{
Message = message;
Time = time;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets string detailing the error encountered during Attach
/// or Detach operation. This string maybe logged, so it should not
/// contain sensitive information.
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets time the error was encountered.
/// </summary>
[JsonProperty(PropertyName = "time")]
public System.DateTime? Time { get; set; }
}
}

View File

@@ -42,8 +42,8 @@ namespace k8s.Models
/// to run the webhook on an object based on whether the namespace for /// to run the webhook on an object based on whether the namespace for
/// that object matches the selector. If the object itself is a /// that object matches the selector. If the object itself is a
/// namespace, the matching is performed on object.metadata.labels. If /// namespace, the matching is performed on object.metadata.labels. If
/// the object is other cluster scoped resource, it is not subjected to /// the object is another cluster scoped resource, it never skips the
/// the webhook. /// webhook.
/// ///
/// For example, to run the webhook on any objects whose namespace is /// For example, to run the webhook on any objects whose namespace is
/// not associated with "runlevel" of "0" or "1"; you will set the /// not associated with "runlevel" of "0" or "1"; you will set the
@@ -84,7 +84,13 @@ namespace k8s.Models
/// everything.</param> /// everything.</param>
/// <param name="rules">Rules describes what operations on what /// <param name="rules">Rules describes what operations on what
/// resources/subresources the webhook cares about. The webhook cares /// resources/subresources the webhook cares about. The webhook cares
/// about an operation if it matches _any_ Rule.</param> /// about an operation if it matches _any_ Rule. However, in order to
/// prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
/// from putting the cluster in a state which cannot be recovered from
/// without completely disabling the plugin,
/// 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>)) public V1beta1Webhook(V1beta1WebhookClientConfig clientConfig, string name, string failurePolicy = default(string), V1LabelSelector namespaceSelector = default(V1LabelSelector), IList<V1beta1RuleWithOperations> rules = default(IList<V1beta1RuleWithOperations>))
{ {
ClientConfig = clientConfig; ClientConfig = clientConfig;
@@ -128,8 +134,8 @@ namespace k8s.Models
/// Gets or sets namespaceSelector decides whether to run the webhook /// Gets or sets namespaceSelector decides whether to run the webhook
/// on an object based on whether the namespace for that object matches /// on an object based on whether the namespace for that object matches
/// the selector. If the object itself is a namespace, the matching is /// the selector. If the object itself is a namespace, the matching is
/// performed on object.metadata.labels. If the object is other cluster /// performed on object.metadata.labels. If the object is another
/// scoped resource, it is not subjected to the webhook. /// cluster scoped resource, it never skips the webhook.
/// ///
/// For example, to run the webhook on any objects whose namespace is /// For example, to run the webhook on any objects whose namespace is
/// not associated with "runlevel" of "0" or "1"; you will set the /// not associated with "runlevel" of "0" or "1"; you will set the
@@ -174,7 +180,13 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Gets or sets rules describes what operations on what /// Gets or sets rules describes what operations on what
/// resources/subresources the webhook cares about. The webhook cares /// resources/subresources the webhook cares about. The webhook cares
/// about an operation if it matches _any_ Rule. /// about an operation if it matches _any_ Rule. However, in order to
/// prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
/// from putting the cluster in a state which cannot be recovered from
/// without completely disabling the plugin,
/// ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never
/// called on admission requests for ValidatingWebhookConfiguration and
/// MutatingWebhookConfiguration objects.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "rules")] [JsonProperty(PropertyName = "rules")]
public IList<V1beta1RuleWithOperations> Rules { get; set; } public IList<V1beta1RuleWithOperations> Rules { 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>
/// 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). Exactly one "target" type should be set.
/// </summary>
public partial class V2beta1ExternalMetricSource
{
/// <summary>
/// Initializes a new instance of the V2beta1ExternalMetricSource
/// class.
/// </summary>
public V2beta1ExternalMetricSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta1ExternalMetricSource
/// class.
/// </summary>
/// <param name="metricName">metricName is the name of the metric in
/// question.</param>
/// <param name="metricSelector">metricSelector is used to identify a
/// specific time series within a given metric.</param>
/// <param name="targetAverageValue">targetAverageValue is the target
/// per-pod value of global metric (as a quantity). Mutually exclusive
/// with TargetValue.</param>
/// <param name="targetValue">targetValue is the target value of the
/// metric (as a quantity). Mutually exclusive with
/// TargetAverageValue.</param>
public V2beta1ExternalMetricSource(string metricName, V1LabelSelector metricSelector = default(V1LabelSelector), ResourceQuantity targetAverageValue = default(ResourceQuantity), ResourceQuantity targetValue = default(ResourceQuantity))
{
MetricName = metricName;
MetricSelector = metricSelector;
TargetAverageValue = targetAverageValue;
TargetValue = targetValue;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <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 metricSelector is used to identify a specific time
/// series within a given metric.
/// </summary>
[JsonProperty(PropertyName = "metricSelector")]
public V1LabelSelector MetricSelector { get; set; }
/// <summary>
/// Gets or sets targetAverageValue is the target per-pod value of
/// global metric (as a quantity). Mutually exclusive with TargetValue.
/// </summary>
[JsonProperty(PropertyName = "targetAverageValue")]
public ResourceQuantity TargetAverageValue { get; set; }
/// <summary>
/// Gets or sets targetValue is the target value of the metric (as a
/// quantity). Mutually exclusive with TargetAverageValue.
/// </summary>
[JsonProperty(PropertyName = "targetValue")]
public ResourceQuantity TargetValue { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (MetricName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "MetricName");
}
}
}
}

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>
/// ExternalMetricStatus indicates the current value of a global metric not
/// associated with any Kubernetes object.
/// </summary>
public partial class V2beta1ExternalMetricStatus
{
/// <summary>
/// Initializes a new instance of the V2beta1ExternalMetricStatus
/// class.
/// </summary>
public V2beta1ExternalMetricStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V2beta1ExternalMetricStatus
/// class.
/// </summary>
/// <param name="currentValue">currentValue is the current value of the
/// metric (as a quantity)</param>
/// <param name="metricName">metricName is the name of a metric used
/// for autoscaling in metric system.</param>
/// <param name="currentAverageValue">currentAverageValue is the
/// current value of metric averaged over autoscaled pods.</param>
/// <param name="metricSelector">metricSelector is used to identify a
/// specific time series within a given metric.</param>
public V2beta1ExternalMetricStatus(ResourceQuantity currentValue, string metricName, ResourceQuantity currentAverageValue = default(ResourceQuantity), V1LabelSelector metricSelector = default(V1LabelSelector))
{
CurrentAverageValue = currentAverageValue;
CurrentValue = currentValue;
MetricName = metricName;
MetricSelector = metricSelector;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets currentAverageValue is the current value of metric
/// averaged over autoscaled pods.
/// </summary>
[JsonProperty(PropertyName = "currentAverageValue")]
public ResourceQuantity CurrentAverageValue { get; set; }
/// <summary>
/// Gets or sets currentValue is the current value of the metric (as a
/// quantity)
/// </summary>
[JsonProperty(PropertyName = "currentValue")]
public ResourceQuantity CurrentValue { get; set; }
/// <summary>
/// Gets or sets metricName is the name of a metric used for
/// autoscaling in metric system.
/// </summary>
[JsonProperty(PropertyName = "metricName")]
public string MetricName { get; set; }
/// <summary>
/// Gets or sets metricSelector is used to identify a specific time
/// series within a given metric.
/// </summary>
[JsonProperty(PropertyName = "metricSelector")]
public V1LabelSelector MetricSelector { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (CurrentValue == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "CurrentValue");
}
if (MetricName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "MetricName");
}
}
}
}

View File

@@ -27,8 +27,14 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Initializes a new instance of the V2beta1MetricSpec class. /// Initializes a new instance of the V2beta1MetricSpec class.
/// </summary> /// </summary>
/// <param name="type">type is the type of metric source. It should /// <param name="type">type is the type of metric source. It should be
/// match one of the fields below.</param> /// 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 /// <param name="objectProperty">object refers to a metric describing a
/// single kubernetes object (for example, hits-per-second on an /// single kubernetes object (for example, hits-per-second on an
/// Ingress object).</param> /// Ingress object).</param>
@@ -42,8 +48,9 @@ namespace k8s.Models
/// memory). Such metrics are built in to Kubernetes, and have special /// memory). Such metrics are built in to Kubernetes, and have special
/// scaling options on top of those available to normal per-pod metrics /// scaling options on top of those available to normal per-pod metrics
/// using the "pods" source.</param> /// using the "pods" source.</param>
public V2beta1MetricSpec(string type, V2beta1ObjectMetricSource objectProperty = default(V2beta1ObjectMetricSource), V2beta1PodsMetricSource pods = default(V2beta1PodsMetricSource), V2beta1ResourceMetricSource resource = default(V2beta1ResourceMetricSource)) public V2beta1MetricSpec(string type, V2beta1ExternalMetricSource external = default(V2beta1ExternalMetricSource), V2beta1ObjectMetricSource objectProperty = default(V2beta1ObjectMetricSource), V2beta1PodsMetricSource pods = default(V2beta1PodsMetricSource), V2beta1ResourceMetricSource resource = default(V2beta1ResourceMetricSource))
{ {
External = external;
ObjectProperty = objectProperty; ObjectProperty = objectProperty;
Pods = pods; Pods = pods;
Resource = resource; Resource = resource;
@@ -56,6 +63,16 @@ namespace k8s.Models
/// </summary> /// </summary>
partial void CustomInit(); 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 V2beta1ExternalMetricSource External { get; set; }
/// <summary> /// <summary>
/// Gets or sets object refers to a metric describing a single /// Gets or sets object refers to a metric describing a single
/// kubernetes object (for example, hits-per-second on an Ingress /// kubernetes object (for example, hits-per-second on an Ingress
@@ -85,8 +102,9 @@ namespace k8s.Models
public V2beta1ResourceMetricSource Resource { get; set; } public V2beta1ResourceMetricSource Resource { get; set; }
/// <summary> /// <summary>
/// Gets or sets type is the type of metric source. It should match /// Gets or sets type is the type of metric source. It should be one
/// one of the fields below. /// of "Object", "Pods" or "Resource", each mapping to a matching field
/// in the object.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "type")] [JsonProperty(PropertyName = "type")]
public string Type { get; set; } public string Type { get; set; }
@@ -103,6 +121,10 @@ namespace k8s.Models
{ {
throw new ValidationException(ValidationRules.CannotBeNull, "Type"); throw new ValidationException(ValidationRules.CannotBeNull, "Type");
} }
if (External != null)
{
External.Validate();
}
if (ObjectProperty != null) if (ObjectProperty != null)
{ {
ObjectProperty.Validate(); ObjectProperty.Validate();

View File

@@ -26,8 +26,14 @@ namespace k8s.Models
/// <summary> /// <summary>
/// Initializes a new instance of the V2beta1MetricStatus class. /// Initializes a new instance of the V2beta1MetricStatus class.
/// </summary> /// </summary>
/// <param name="type">type is the type of metric source. It will /// <param name="type">type is the type of metric source. It will be
/// match one of the fields below.</param> /// 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 /// <param name="objectProperty">object refers to a metric describing a
/// single kubernetes object (for example, hits-per-second on an /// single kubernetes object (for example, hits-per-second on an
/// Ingress object).</param> /// Ingress object).</param>
@@ -41,8 +47,9 @@ namespace k8s.Models
/// memory). Such metrics are built in to Kubernetes, and have special /// memory). Such metrics are built in to Kubernetes, and have special
/// scaling options on top of those available to normal per-pod metrics /// scaling options on top of those available to normal per-pod metrics
/// using the "pods" source.</param> /// using the "pods" source.</param>
public V2beta1MetricStatus(string type, V2beta1ObjectMetricStatus objectProperty = default(V2beta1ObjectMetricStatus), V2beta1PodsMetricStatus pods = default(V2beta1PodsMetricStatus), V2beta1ResourceMetricStatus resource = default(V2beta1ResourceMetricStatus)) public V2beta1MetricStatus(string type, V2beta1ExternalMetricStatus external = default(V2beta1ExternalMetricStatus), V2beta1ObjectMetricStatus objectProperty = default(V2beta1ObjectMetricStatus), V2beta1PodsMetricStatus pods = default(V2beta1PodsMetricStatus), V2beta1ResourceMetricStatus resource = default(V2beta1ResourceMetricStatus))
{ {
External = external;
ObjectProperty = objectProperty; ObjectProperty = objectProperty;
Pods = pods; Pods = pods;
Resource = resource; Resource = resource;
@@ -55,6 +62,16 @@ namespace k8s.Models
/// </summary> /// </summary>
partial void CustomInit(); 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 V2beta1ExternalMetricStatus External { get; set; }
/// <summary> /// <summary>
/// Gets or sets object refers to a metric describing a single /// Gets or sets object refers to a metric describing a single
/// kubernetes object (for example, hits-per-second on an Ingress /// kubernetes object (for example, hits-per-second on an Ingress
@@ -84,8 +101,9 @@ namespace k8s.Models
public V2beta1ResourceMetricStatus Resource { get; set; } public V2beta1ResourceMetricStatus Resource { get; set; }
/// <summary> /// <summary>
/// Gets or sets type is the type of metric source. It will match one /// Gets or sets type is the type of metric source. It will be one of
/// of the fields below. /// "Object", "Pods" or "Resource", each corresponds to a matching
/// field in the object.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "type")] [JsonProperty(PropertyName = "type")]
public string Type { get; set; } public string Type { get; set; }
@@ -102,6 +120,10 @@ namespace k8s.Models
{ {
throw new ValidationException(ValidationRules.CannotBeNull, "Type"); throw new ValidationException(ValidationRules.CannotBeNull, "Type");
} }
if (External != null)
{
External.Validate();
}
if (ObjectProperty != null) if (ObjectProperty != null)
{ {
ObjectProperty.Validate(); ObjectProperty.Validate();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff