Initial add of generated code, update readme, add settings file.

This commit is contained in:
Brendan Burns
2017-06-06 23:02:14 -07:00
parent 08c455751a
commit d42da04e5d
333 changed files with 208792 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
.vscode
obj/
bin/

View File

@@ -1,2 +1,28 @@
# csharp
Work In Progress
# Generating the client code
## Prerequisites
Check out the generator project into some other directory
(henceforth `$GEN_DIR`)
```
cd $GEN_DIR/..
git clone https://github.com/kubernetes-client/gen
```
Install the [`autorest` tool](https://github.com/azure/autorest):
```
npm install autorest
```
## Generating code
```
# Where REPO_DIR points to the root of the csharp repository
cd ${REPO_DIR}/csharp/src
${GEN_DIR}/openapi/csharp.sh generated csharp.settings
```

3
csharp.settings Normal file
View File

@@ -0,0 +1,3 @@
export KUBERNETES_BRANCH=v1.6.0
export CLIENT_VERSION=0.0.1
export PACKAGE_NAME=k8s

10
src/csharp.csproj Executable file
View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="3.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
</ItemGroup>
</Project>

13775
src/generated/IKubernetes.cs Executable file

File diff suppressed because it is too large Load Diff

88817
src/generated/Kubernetes.cs Executable file

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,109 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Deployment enables declarative updates for Pods and ReplicaSets.
/// </summary>
public partial class Appsv1beta1Deployment
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1Deployment class.
/// </summary>
public Appsv1beta1Deployment()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1Deployment 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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object metadata.</param>
/// <param name="spec">Specification of the desired behavior of the
/// Deployment.</param>
/// <param name="status">Most recently observed status of the
/// Deployment.</param>
public Appsv1beta1Deployment(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Appsv1beta1DeploymentSpec spec = default(Appsv1beta1DeploymentSpec), Appsv1beta1DeploymentStatus status = default(Appsv1beta1DeploymentStatus))
{
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard object metadata.
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets specification of the desired behavior of the
/// Deployment.
/// </summary>
[JsonProperty(PropertyName = "spec")]
public Appsv1beta1DeploymentSpec Spec { get; set; }
/// <summary>
/// Gets or sets most recently observed status of the Deployment.
/// </summary>
[JsonProperty(PropertyName = "status")]
public Appsv1beta1DeploymentStatus Status { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Spec != null)
{
Spec.Validate();
}
}
}
}

View File

@@ -0,0 +1,113 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// DeploymentCondition describes the state of a deployment at a certain
/// point.
/// </summary>
public partial class Appsv1beta1DeploymentCondition
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentCondition
/// class.
/// </summary>
public Appsv1beta1DeploymentCondition()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentCondition
/// class.
/// </summary>
/// <param name="status">Status of the condition, one of True, False,
/// Unknown.</param>
/// <param name="type">Type of deployment condition.</param>
/// <param name="lastTransitionTime">Last time the condition
/// transitioned from one status to another.</param>
/// <param name="lastUpdateTime">The last time this condition was
/// updated.</param>
/// <param name="message">A human readable message indicating details
/// about the transition.</param>
/// <param name="reason">The reason for the condition's last
/// transition.</param>
public Appsv1beta1DeploymentCondition(string status, string type, System.DateTime? lastTransitionTime = default(System.DateTime?), System.DateTime? lastUpdateTime = default(System.DateTime?), string message = default(string), string reason = default(string))
{
LastTransitionTime = lastTransitionTime;
LastUpdateTime = lastUpdateTime;
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 the last time this condition was updated.
/// </summary>
[JsonProperty(PropertyName = "lastUpdateTime")]
public System.DateTime? LastUpdateTime { get; set; }
/// <summary>
/// Gets or sets a human readable message indicating details about the
/// transition.
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets the reason for the condition's last transition.
/// </summary>
[JsonProperty(PropertyName = "reason")]
public string Reason { get; set; }
/// <summary>
/// Gets or sets status of the condition, one of True, False, Unknown.
/// </summary>
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
/// <summary>
/// Gets or sets type of deployment 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,111 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// DeploymentList is a list of Deployments.
/// </summary>
public partial class Appsv1beta1DeploymentList
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentList class.
/// </summary>
public Appsv1beta1DeploymentList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentList class.
/// </summary>
/// <param name="items">Items is the list of Deployments.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard list metadata.</param>
public Appsv1beta1DeploymentList(IList<Appsv1beta1Deployment> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets items is the list of Deployments.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<Appsv1beta1Deployment> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard list metadata.
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ListMeta Metadata { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Items == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Items");
}
if (Items != null)
{
foreach (var element in Items)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,119 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// DeploymentRollback stores the information required to rollback a
/// deployment.
/// </summary>
public partial class Appsv1beta1DeploymentRollback
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentRollback
/// class.
/// </summary>
public Appsv1beta1DeploymentRollback()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentRollback
/// class.
/// </summary>
/// <param name="name">Required: This must match the Name of a
/// deployment.</param>
/// <param name="rollbackTo">The config of this deployment
/// rollback.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="updatedAnnotations">The annotations to be updated to a
/// deployment</param>
public Appsv1beta1DeploymentRollback(string name, Appsv1beta1RollbackConfig rollbackTo, string apiVersion = default(string), string kind = default(string), IDictionary<string, string> updatedAnnotations = default(IDictionary<string, string>))
{
ApiVersion = apiVersion;
Kind = kind;
Name = name;
RollbackTo = rollbackTo;
UpdatedAnnotations = updatedAnnotations;
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets required: This must match the Name of a deployment.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets the config of this deployment rollback.
/// </summary>
[JsonProperty(PropertyName = "rollbackTo")]
public Appsv1beta1RollbackConfig RollbackTo { get; set; }
/// <summary>
/// Gets or sets the annotations to be updated to a deployment
/// </summary>
[JsonProperty(PropertyName = "updatedAnnotations")]
public IDictionary<string, string> UpdatedAnnotations { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (RollbackTo == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "RollbackTo");
}
}
}
}

View File

@@ -0,0 +1,165 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// DeploymentSpec is the specification of the desired behavior of the
/// Deployment.
/// </summary>
public partial class Appsv1beta1DeploymentSpec
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentSpec class.
/// </summary>
public Appsv1beta1DeploymentSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentSpec class.
/// </summary>
/// <param name="template">Template describes the pods that will be
/// created.</param>
/// <param name="minReadySeconds">Minimum number of seconds for which a
/// newly created pod should be ready without any of its container
/// crashing, for it to be considered available. Defaults to 0 (pod
/// will be considered available as soon as it is ready)</param>
/// <param name="paused">Indicates that the deployment is
/// paused.</param>
/// <param name="progressDeadlineSeconds">The maximum time in seconds
/// for a deployment to make progress before it is considered to be
/// failed. The deployment controller will continue to process failed
/// deployments and a condition with a ProgressDeadlineExceeded reason
/// will be surfaced in the deployment status. Once autoRollback is
/// implemented, the deployment controller will automatically rollback
/// failed deployments. Note that progress will not be estimated during
/// the time a deployment is paused. Defaults to 600s.</param>
/// <param name="replicas">Number of desired pods. This is a pointer to
/// distinguish between explicit zero and not specified. Defaults to
/// 1.</param>
/// <param name="revisionHistoryLimit">The number of old ReplicaSets to
/// retain to allow rollback. This is a pointer to distinguish between
/// explicit zero and not specified. Defaults to 2.</param>
/// <param name="rollbackTo">The config this deployment is rolling back
/// to. Will be cleared after rollback is done.</param>
/// <param name="selector">Label selector for pods. Existing
/// ReplicaSets whose pods are selected by this will be the ones
/// affected by this deployment.</param>
/// <param name="strategy">The deployment strategy to use to replace
/// existing pods with new ones.</param>
public Appsv1beta1DeploymentSpec(V1PodTemplateSpec template, int? minReadySeconds = default(int?), bool? paused = default(bool?), int? progressDeadlineSeconds = default(int?), int? replicas = default(int?), int? revisionHistoryLimit = default(int?), Appsv1beta1RollbackConfig rollbackTo = default(Appsv1beta1RollbackConfig), V1LabelSelector selector = default(V1LabelSelector), Appsv1beta1DeploymentStrategy strategy = default(Appsv1beta1DeploymentStrategy))
{
MinReadySeconds = minReadySeconds;
Paused = paused;
ProgressDeadlineSeconds = progressDeadlineSeconds;
Replicas = replicas;
RevisionHistoryLimit = revisionHistoryLimit;
RollbackTo = rollbackTo;
Selector = selector;
Strategy = strategy;
Template = template;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets minimum number of seconds for which a newly created
/// pod should be ready without any of its container crashing, for it
/// to be considered available. Defaults to 0 (pod will be considered
/// available as soon as it is ready)
/// </summary>
[JsonProperty(PropertyName = "minReadySeconds")]
public int? MinReadySeconds { get; set; }
/// <summary>
/// Gets or sets indicates that the deployment is paused.
/// </summary>
[JsonProperty(PropertyName = "paused")]
public bool? Paused { get; set; }
/// <summary>
/// Gets or sets the maximum time in seconds for a deployment to make
/// progress before it is considered to be failed. The deployment
/// controller will continue to process failed deployments and a
/// condition with a ProgressDeadlineExceeded reason will be surfaced
/// in the deployment status. Once autoRollback is implemented, the
/// deployment controller will automatically rollback failed
/// deployments. Note that progress will not be estimated during the
/// time a deployment is paused. Defaults to 600s.
/// </summary>
[JsonProperty(PropertyName = "progressDeadlineSeconds")]
public int? ProgressDeadlineSeconds { get; set; }
/// <summary>
/// Gets or sets number of desired pods. This is a pointer to
/// distinguish between explicit zero and not specified. Defaults to 1.
/// </summary>
[JsonProperty(PropertyName = "replicas")]
public int? Replicas { get; set; }
/// <summary>
/// Gets or sets the number of old ReplicaSets to retain to allow
/// rollback. This is a pointer to distinguish between explicit zero
/// and not specified. Defaults to 2.
/// </summary>
[JsonProperty(PropertyName = "revisionHistoryLimit")]
public int? RevisionHistoryLimit { get; set; }
/// <summary>
/// Gets or sets the config this deployment is rolling back to. Will be
/// cleared after rollback is done.
/// </summary>
[JsonProperty(PropertyName = "rollbackTo")]
public Appsv1beta1RollbackConfig RollbackTo { get; set; }
/// <summary>
/// Gets or sets label selector for pods. Existing ReplicaSets whose
/// pods are selected by this will be the ones affected by this
/// deployment.
/// </summary>
[JsonProperty(PropertyName = "selector")]
public V1LabelSelector Selector { get; set; }
/// <summary>
/// Gets or sets the deployment strategy to use to replace existing
/// pods with new ones.
/// </summary>
[JsonProperty(PropertyName = "strategy")]
public Appsv1beta1DeploymentStrategy Strategy { get; set; }
/// <summary>
/// Gets or sets template describes the pods that will be created.
/// </summary>
[JsonProperty(PropertyName = "template")]
public V1PodTemplateSpec Template { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Template == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Template");
}
if (Template != null)
{
Template.Validate();
}
}
}
}

View File

@@ -0,0 +1,113 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// DeploymentStatus is the most recently observed status of the
/// Deployment.
/// </summary>
public partial class Appsv1beta1DeploymentStatus
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentStatus
/// class.
/// </summary>
public Appsv1beta1DeploymentStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentStatus
/// class.
/// </summary>
/// <param name="availableReplicas">Total number of available pods
/// (ready for at least minReadySeconds) targeted by this
/// deployment.</param>
/// <param name="conditions">Represents the latest available
/// observations of a deployment's current state.</param>
/// <param name="observedGeneration">The generation observed by the
/// deployment controller.</param>
/// <param name="readyReplicas">Total number of ready pods targeted by
/// this deployment.</param>
/// <param name="replicas">Total number of non-terminated pods targeted
/// by this deployment (their labels match the selector).</param>
/// <param name="unavailableReplicas">Total number of unavailable pods
/// targeted by this deployment.</param>
/// <param name="updatedReplicas">Total number of non-terminated pods
/// targeted by this deployment that have the desired template
/// spec.</param>
public Appsv1beta1DeploymentStatus(int? availableReplicas = default(int?), IList<Appsv1beta1DeploymentCondition> conditions = default(IList<Appsv1beta1DeploymentCondition>), long? observedGeneration = default(long?), int? readyReplicas = default(int?), int? replicas = default(int?), int? unavailableReplicas = default(int?), int? updatedReplicas = default(int?))
{
AvailableReplicas = availableReplicas;
Conditions = conditions;
ObservedGeneration = observedGeneration;
ReadyReplicas = readyReplicas;
Replicas = replicas;
UnavailableReplicas = unavailableReplicas;
UpdatedReplicas = updatedReplicas;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets total number of available pods (ready for at least
/// minReadySeconds) targeted by this deployment.
/// </summary>
[JsonProperty(PropertyName = "availableReplicas")]
public int? AvailableReplicas { get; set; }
/// <summary>
/// Gets or sets represents the latest available observations of a
/// deployment's current state.
/// </summary>
[JsonProperty(PropertyName = "conditions")]
public IList<Appsv1beta1DeploymentCondition> Conditions { get; set; }
/// <summary>
/// Gets or sets the generation observed by the deployment controller.
/// </summary>
[JsonProperty(PropertyName = "observedGeneration")]
public long? ObservedGeneration { get; set; }
/// <summary>
/// Gets or sets total number of ready pods targeted by this
/// deployment.
/// </summary>
[JsonProperty(PropertyName = "readyReplicas")]
public int? ReadyReplicas { get; set; }
/// <summary>
/// Gets or sets total number of non-terminated pods targeted by this
/// deployment (their labels match the selector).
/// </summary>
[JsonProperty(PropertyName = "replicas")]
public int? Replicas { get; set; }
/// <summary>
/// Gets or sets total number of unavailable pods targeted by this
/// deployment.
/// </summary>
[JsonProperty(PropertyName = "unavailableReplicas")]
public int? UnavailableReplicas { get; set; }
/// <summary>
/// Gets or sets total number of non-terminated pods targeted by this
/// deployment that have the desired template spec.
/// </summary>
[JsonProperty(PropertyName = "updatedReplicas")]
public int? UpdatedReplicas { get; set; }
}
}

View File

@@ -0,0 +1,60 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// DeploymentStrategy describes how to replace existing pods with new
/// ones.
/// </summary>
public partial class Appsv1beta1DeploymentStrategy
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentStrategy
/// class.
/// </summary>
public Appsv1beta1DeploymentStrategy()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1DeploymentStrategy
/// class.
/// </summary>
/// <param name="rollingUpdate">Rolling update config params. Present
/// only if DeploymentStrategyType = RollingUpdate.</param>
/// <param name="type">Type of deployment. Can be "Recreate" or
/// "RollingUpdate". Default is RollingUpdate.</param>
public Appsv1beta1DeploymentStrategy(Appsv1beta1RollingUpdateDeployment rollingUpdate = default(Appsv1beta1RollingUpdateDeployment), string type = default(string))
{
RollingUpdate = rollingUpdate;
Type = type;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets rolling update config params. Present only if
/// DeploymentStrategyType = RollingUpdate.
/// </summary>
[JsonProperty(PropertyName = "rollingUpdate")]
public Appsv1beta1RollingUpdateDeployment RollingUpdate { get; set; }
/// <summary>
/// Gets or sets type of deployment. Can be "Recreate" or
/// "RollingUpdate". Default is RollingUpdate.
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
}
}

View File

@@ -0,0 +1,44 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
public partial class Appsv1beta1RollbackConfig
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1RollbackConfig class.
/// </summary>
public Appsv1beta1RollbackConfig()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1RollbackConfig class.
/// </summary>
/// <param name="revision">The revision to rollback to. If set to 0,
/// rollbck to the last revision.</param>
public Appsv1beta1RollbackConfig(long? revision = default(long?))
{
Revision = revision;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the revision to rollback to. If set to 0, rollbck to
/// the last revision.
/// </summary>
[JsonProperty(PropertyName = "revision")]
public long? Revision { get; set; }
}
}

View File

@@ -0,0 +1,93 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Spec to control the desired behavior of rolling update.
/// </summary>
public partial class Appsv1beta1RollingUpdateDeployment
{
/// <summary>
/// Initializes a new instance of the
/// Appsv1beta1RollingUpdateDeployment class.
/// </summary>
public Appsv1beta1RollingUpdateDeployment()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Appsv1beta1RollingUpdateDeployment class.
/// </summary>
/// <param name="maxSurge">The maximum number of pods that can be
/// scheduled above the desired number of pods. Value can be an
/// absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
/// This can not be 0 if MaxUnavailable is 0. Absolute number is
/// calculated from percentage by rounding up. Defaults to 25%.
/// Example: when this is set to 30%, the new RC can be scaled up
/// immediately when the rolling update 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 can be scaled up further,
/// ensuring that total number of pods running at any time during the
/// update is atmost 130% of desired pods.</param>
/// <param name="maxUnavailable">The maximum number of pods that can be
/// unavailable during the update. Value can be an absolute number (ex:
/// 5) or a percentage of desired pods (ex: 10%). Absolute number is
/// calculated from percentage by rounding down. This can not be 0 if
/// MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%,
/// the old RC can be scaled down to 70% of desired pods immediately
/// when the rolling update starts. Once new pods are ready, old RC can
/// be scaled down further, followed by scaling up the new RC, ensuring
/// that the total number of pods available at all times during the
/// update is at least 70% of desired pods.</param>
public Appsv1beta1RollingUpdateDeployment(string maxSurge = default(string), string maxUnavailable = default(string))
{
MaxSurge = maxSurge;
MaxUnavailable = maxUnavailable;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the maximum number of pods that can be scheduled above
/// the desired number of pods. Value can be an absolute number (ex: 5)
/// or a percentage of desired pods (ex: 10%). This can not be 0 if
/// MaxUnavailable is 0. Absolute number is calculated from percentage
/// by rounding up. Defaults to 25%. Example: when this is set to 30%,
/// the new RC can be scaled up immediately when the rolling update
/// 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
/// can be scaled up further, ensuring that total number of pods
/// running at any time during the update is atmost 130% of desired
/// pods.
/// </summary>
[JsonProperty(PropertyName = "maxSurge")]
public string MaxSurge { get; set; }
/// <summary>
/// Gets or sets the maximum number of pods that can be unavailable
/// during the update. Value can be an absolute number (ex: 5) or a
/// percentage of desired pods (ex: 10%). Absolute number is calculated
/// from percentage by rounding down. This can not be 0 if MaxSurge is
/// 0. Defaults to 25%. Example: when this is set to 30%, the old RC
/// can be scaled down to 70% of desired pods immediately when the
/// rolling update starts. Once new pods are ready, old RC can be
/// scaled down further, followed by scaling up the new RC, ensuring
/// that the total number of pods available at all times during the
/// update is at least 70% of desired pods.
/// </summary>
[JsonProperty(PropertyName = "maxUnavailable")]
public string MaxUnavailable { get; set; }
}
}

View File

@@ -0,0 +1,114 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Scale represents a scaling request for a resource.
/// </summary>
public partial class Appsv1beta1Scale
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1Scale class.
/// </summary>
public Appsv1beta1Scale()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1Scale 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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object metadata; More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.</param>
/// <param name="spec">defines the behavior of the scale. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.</param>
/// <param name="status">current status of the scale. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
/// Read-only.</param>
public Appsv1beta1Scale(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Appsv1beta1ScaleSpec spec = default(Appsv1beta1ScaleSpec), Appsv1beta1ScaleStatus status = default(Appsv1beta1ScaleStatus))
{
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard object metadata; More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets defines the behavior of the scale. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
/// </summary>
[JsonProperty(PropertyName = "spec")]
public Appsv1beta1ScaleSpec Spec { get; set; }
/// <summary>
/// Gets or sets current status of the scale. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
/// Read-only.
/// </summary>
[JsonProperty(PropertyName = "status")]
public Appsv1beta1ScaleStatus Status { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Status != null)
{
Status.Validate();
}
}
}
}

View File

@@ -0,0 +1,46 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ScaleSpec describes the attributes of a scale subresource
/// </summary>
public partial class Appsv1beta1ScaleSpec
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1ScaleSpec class.
/// </summary>
public Appsv1beta1ScaleSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1ScaleSpec class.
/// </summary>
/// <param name="replicas">desired number of instances for the scaled
/// object.</param>
public Appsv1beta1ScaleSpec(int? replicas = default(int?))
{
Replicas = replicas;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets desired number of instances for the scaled object.
/// </summary>
[JsonProperty(PropertyName = "replicas")]
public int? Replicas { get; set; }
}
}

View File

@@ -0,0 +1,92 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// ScaleStatus represents the current status of a scale subresource.
/// </summary>
public partial class Appsv1beta1ScaleStatus
{
/// <summary>
/// Initializes a new instance of the Appsv1beta1ScaleStatus class.
/// </summary>
public Appsv1beta1ScaleStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Appsv1beta1ScaleStatus class.
/// </summary>
/// <param name="replicas">actual number of observed instances of the
/// scaled object.</param>
/// <param name="selector">label query over pods that should match the
/// replicas count. More info:
/// http://kubernetes.io/docs/user-guide/labels#label-selectors</param>
/// <param name="targetSelector">label selector for pods that should
/// match the replicas count. This is a serializated version of both
/// map-based and more expressive set-based selectors. This is done to
/// avoid introspection in the clients. The string will be in the same
/// format as the query-param syntax. If the target type only supports
/// map-based selectors, both this field and map-based selector field
/// are populated. More info:
/// http://kubernetes.io/docs/user-guide/labels#label-selectors</param>
public Appsv1beta1ScaleStatus(int replicas, IDictionary<string, string> selector = default(IDictionary<string, string>), string targetSelector = default(string))
{
Replicas = replicas;
Selector = selector;
TargetSelector = targetSelector;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets actual number of observed instances of the scaled
/// object.
/// </summary>
[JsonProperty(PropertyName = "replicas")]
public int Replicas { get; set; }
/// <summary>
/// Gets or sets label query over pods that should match the replicas
/// count. More info:
/// http://kubernetes.io/docs/user-guide/labels#label-selectors
/// </summary>
[JsonProperty(PropertyName = "selector")]
public IDictionary<string, string> Selector { get; set; }
/// <summary>
/// Gets or sets label selector for pods that should match the replicas
/// count. This is a serializated version of both map-based and more
/// expressive set-based selectors. This is done to avoid introspection
/// in the clients. The string will be in the same format as the
/// query-param syntax. If the target type only supports map-based
/// selectors, both this field and map-based selector field are
/// populated. More info:
/// http://kubernetes.io/docs/user-guide/labels#label-selectors
/// </summary>
[JsonProperty(PropertyName = "targetSelector")]
public string TargetSelector { 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,111 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Deployment enables declarative updates for Pods and ReplicaSets.
/// </summary>
public partial class Extensionsv1beta1Deployment
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1Deployment
/// class.
/// </summary>
public Extensionsv1beta1Deployment()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1Deployment
/// 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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object metadata.</param>
/// <param name="spec">Specification of the desired behavior of the
/// Deployment.</param>
/// <param name="status">Most recently observed status of the
/// Deployment.</param>
public Extensionsv1beta1Deployment(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Extensionsv1beta1DeploymentSpec spec = default(Extensionsv1beta1DeploymentSpec), Extensionsv1beta1DeploymentStatus status = default(Extensionsv1beta1DeploymentStatus))
{
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard object metadata.
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets specification of the desired behavior of the
/// Deployment.
/// </summary>
[JsonProperty(PropertyName = "spec")]
public Extensionsv1beta1DeploymentSpec Spec { get; set; }
/// <summary>
/// Gets or sets most recently observed status of the Deployment.
/// </summary>
[JsonProperty(PropertyName = "status")]
public Extensionsv1beta1DeploymentStatus Status { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Spec != null)
{
Spec.Validate();
}
}
}
}

View File

@@ -0,0 +1,113 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// DeploymentCondition describes the state of a deployment at a certain
/// point.
/// </summary>
public partial class Extensionsv1beta1DeploymentCondition
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1DeploymentCondition class.
/// </summary>
public Extensionsv1beta1DeploymentCondition()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1DeploymentCondition class.
/// </summary>
/// <param name="status">Status of the condition, one of True, False,
/// Unknown.</param>
/// <param name="type">Type of deployment condition.</param>
/// <param name="lastTransitionTime">Last time the condition
/// transitioned from one status to another.</param>
/// <param name="lastUpdateTime">The last time this condition was
/// updated.</param>
/// <param name="message">A human readable message indicating details
/// about the transition.</param>
/// <param name="reason">The reason for the condition's last
/// transition.</param>
public Extensionsv1beta1DeploymentCondition(string status, string type, System.DateTime? lastTransitionTime = default(System.DateTime?), System.DateTime? lastUpdateTime = default(System.DateTime?), string message = default(string), string reason = default(string))
{
LastTransitionTime = lastTransitionTime;
LastUpdateTime = lastUpdateTime;
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 the last time this condition was updated.
/// </summary>
[JsonProperty(PropertyName = "lastUpdateTime")]
public System.DateTime? LastUpdateTime { get; set; }
/// <summary>
/// Gets or sets a human readable message indicating details about the
/// transition.
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets the reason for the condition's last transition.
/// </summary>
[JsonProperty(PropertyName = "reason")]
public string Reason { get; set; }
/// <summary>
/// Gets or sets status of the condition, one of True, False, Unknown.
/// </summary>
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
/// <summary>
/// Gets or sets type of deployment 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,113 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// DeploymentList is a list of Deployments.
/// </summary>
public partial class Extensionsv1beta1DeploymentList
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1DeploymentList
/// class.
/// </summary>
public Extensionsv1beta1DeploymentList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1DeploymentList
/// class.
/// </summary>
/// <param name="items">Items is the list of Deployments.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard list metadata.</param>
public Extensionsv1beta1DeploymentList(IList<Extensionsv1beta1Deployment> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets items is the list of Deployments.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<Extensionsv1beta1Deployment> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard list metadata.
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ListMeta Metadata { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Items == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Items");
}
if (Items != null)
{
foreach (var element in Items)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,119 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// DeploymentRollback stores the information required to rollback a
/// deployment.
/// </summary>
public partial class Extensionsv1beta1DeploymentRollback
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1DeploymentRollback class.
/// </summary>
public Extensionsv1beta1DeploymentRollback()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1DeploymentRollback class.
/// </summary>
/// <param name="name">Required: This must match the Name of a
/// deployment.</param>
/// <param name="rollbackTo">The config of this deployment
/// rollback.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="updatedAnnotations">The annotations to be updated to a
/// deployment</param>
public Extensionsv1beta1DeploymentRollback(string name, Extensionsv1beta1RollbackConfig rollbackTo, string apiVersion = default(string), string kind = default(string), IDictionary<string, string> updatedAnnotations = default(IDictionary<string, string>))
{
ApiVersion = apiVersion;
Kind = kind;
Name = name;
RollbackTo = rollbackTo;
UpdatedAnnotations = updatedAnnotations;
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets required: This must match the Name of a deployment.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets the config of this deployment rollback.
/// </summary>
[JsonProperty(PropertyName = "rollbackTo")]
public Extensionsv1beta1RollbackConfig RollbackTo { get; set; }
/// <summary>
/// Gets or sets the annotations to be updated to a deployment
/// </summary>
[JsonProperty(PropertyName = "updatedAnnotations")]
public IDictionary<string, string> UpdatedAnnotations { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (RollbackTo == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "RollbackTo");
}
}
}
}

View File

@@ -0,0 +1,169 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// DeploymentSpec is the specification of the desired behavior of the
/// Deployment.
/// </summary>
public partial class Extensionsv1beta1DeploymentSpec
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1DeploymentSpec
/// class.
/// </summary>
public Extensionsv1beta1DeploymentSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1DeploymentSpec
/// class.
/// </summary>
/// <param name="template">Template describes the pods that will be
/// created.</param>
/// <param name="minReadySeconds">Minimum number of seconds for which a
/// newly created pod should be ready without any of its container
/// crashing, for it to be considered available. Defaults to 0 (pod
/// will be considered available as soon as it is ready)</param>
/// <param name="paused">Indicates that the deployment is paused and
/// will not be processed by the deployment controller.</param>
/// <param name="progressDeadlineSeconds">The maximum time in seconds
/// for a deployment to make progress before it is considered to be
/// failed. The deployment controller will continue to process failed
/// deployments and a condition with a ProgressDeadlineExceeded reason
/// will be surfaced in the deployment status. Once autoRollback is
/// implemented, the deployment controller will automatically rollback
/// failed deployments. Note that progress will not be estimated during
/// the time a deployment is paused. This is not set by
/// default.</param>
/// <param name="replicas">Number of desired pods. This is a pointer to
/// distinguish between explicit zero and not specified. Defaults to
/// 1.</param>
/// <param name="revisionHistoryLimit">The number of old ReplicaSets to
/// retain to allow rollback. This is a pointer to distinguish between
/// explicit zero and not specified.</param>
/// <param name="rollbackTo">The config this deployment is rolling back
/// to. Will be cleared after rollback is done.</param>
/// <param name="selector">Label selector for pods. Existing
/// ReplicaSets whose pods are selected by this will be the ones
/// affected by this deployment.</param>
/// <param name="strategy">The deployment strategy to use to replace
/// existing pods with new ones.</param>
public Extensionsv1beta1DeploymentSpec(V1PodTemplateSpec template, int? minReadySeconds = default(int?), bool? paused = default(bool?), int? progressDeadlineSeconds = default(int?), int? replicas = default(int?), int? revisionHistoryLimit = default(int?), Extensionsv1beta1RollbackConfig rollbackTo = default(Extensionsv1beta1RollbackConfig), V1LabelSelector selector = default(V1LabelSelector), Extensionsv1beta1DeploymentStrategy strategy = default(Extensionsv1beta1DeploymentStrategy))
{
MinReadySeconds = minReadySeconds;
Paused = paused;
ProgressDeadlineSeconds = progressDeadlineSeconds;
Replicas = replicas;
RevisionHistoryLimit = revisionHistoryLimit;
RollbackTo = rollbackTo;
Selector = selector;
Strategy = strategy;
Template = template;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets minimum number of seconds for which a newly created
/// pod should be ready without any of its container crashing, for it
/// to be considered available. Defaults to 0 (pod will be considered
/// available as soon as it is ready)
/// </summary>
[JsonProperty(PropertyName = "minReadySeconds")]
public int? MinReadySeconds { get; set; }
/// <summary>
/// Gets or sets indicates that the deployment is paused and will not
/// be processed by the deployment controller.
/// </summary>
[JsonProperty(PropertyName = "paused")]
public bool? Paused { get; set; }
/// <summary>
/// Gets or sets the maximum time in seconds for a deployment to make
/// progress before it is considered to be failed. The deployment
/// controller will continue to process failed deployments and a
/// condition with a ProgressDeadlineExceeded reason will be surfaced
/// in the deployment status. Once autoRollback is implemented, the
/// deployment controller will automatically rollback failed
/// deployments. Note that progress will not be estimated during the
/// time a deployment is paused. This is not set by default.
/// </summary>
[JsonProperty(PropertyName = "progressDeadlineSeconds")]
public int? ProgressDeadlineSeconds { get; set; }
/// <summary>
/// Gets or sets number of desired pods. This is a pointer to
/// distinguish between explicit zero and not specified. Defaults to 1.
/// </summary>
[JsonProperty(PropertyName = "replicas")]
public int? Replicas { get; set; }
/// <summary>
/// Gets or sets the number of old ReplicaSets to retain to allow
/// rollback. This is a pointer to distinguish between explicit zero
/// and not specified.
/// </summary>
[JsonProperty(PropertyName = "revisionHistoryLimit")]
public int? RevisionHistoryLimit { get; set; }
/// <summary>
/// Gets or sets the config this deployment is rolling back to. Will be
/// cleared after rollback is done.
/// </summary>
[JsonProperty(PropertyName = "rollbackTo")]
public Extensionsv1beta1RollbackConfig RollbackTo { get; set; }
/// <summary>
/// Gets or sets label selector for pods. Existing ReplicaSets whose
/// pods are selected by this will be the ones affected by this
/// deployment.
/// </summary>
[JsonProperty(PropertyName = "selector")]
public V1LabelSelector Selector { get; set; }
/// <summary>
/// Gets or sets the deployment strategy to use to replace existing
/// pods with new ones.
/// </summary>
[JsonProperty(PropertyName = "strategy")]
public Extensionsv1beta1DeploymentStrategy Strategy { get; set; }
/// <summary>
/// Gets or sets template describes the pods that will be created.
/// </summary>
[JsonProperty(PropertyName = "template")]
public V1PodTemplateSpec Template { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Template == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Template");
}
if (Template != null)
{
Template.Validate();
}
}
}
}

View File

@@ -0,0 +1,113 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// DeploymentStatus is the most recently observed status of the
/// Deployment.
/// </summary>
public partial class Extensionsv1beta1DeploymentStatus
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1DeploymentStatus
/// class.
/// </summary>
public Extensionsv1beta1DeploymentStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1DeploymentStatus
/// class.
/// </summary>
/// <param name="availableReplicas">Total number of available pods
/// (ready for at least minReadySeconds) targeted by this
/// deployment.</param>
/// <param name="conditions">Represents the latest available
/// observations of a deployment's current state.</param>
/// <param name="observedGeneration">The generation observed by the
/// deployment controller.</param>
/// <param name="readyReplicas">Total number of ready pods targeted by
/// this deployment.</param>
/// <param name="replicas">Total number of non-terminated pods targeted
/// by this deployment (their labels match the selector).</param>
/// <param name="unavailableReplicas">Total number of unavailable pods
/// targeted by this deployment.</param>
/// <param name="updatedReplicas">Total number of non-terminated pods
/// targeted by this deployment that have the desired template
/// spec.</param>
public Extensionsv1beta1DeploymentStatus(int? availableReplicas = default(int?), IList<Extensionsv1beta1DeploymentCondition> conditions = default(IList<Extensionsv1beta1DeploymentCondition>), long? observedGeneration = default(long?), int? readyReplicas = default(int?), int? replicas = default(int?), int? unavailableReplicas = default(int?), int? updatedReplicas = default(int?))
{
AvailableReplicas = availableReplicas;
Conditions = conditions;
ObservedGeneration = observedGeneration;
ReadyReplicas = readyReplicas;
Replicas = replicas;
UnavailableReplicas = unavailableReplicas;
UpdatedReplicas = updatedReplicas;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets total number of available pods (ready for at least
/// minReadySeconds) targeted by this deployment.
/// </summary>
[JsonProperty(PropertyName = "availableReplicas")]
public int? AvailableReplicas { get; set; }
/// <summary>
/// Gets or sets represents the latest available observations of a
/// deployment's current state.
/// </summary>
[JsonProperty(PropertyName = "conditions")]
public IList<Extensionsv1beta1DeploymentCondition> Conditions { get; set; }
/// <summary>
/// Gets or sets the generation observed by the deployment controller.
/// </summary>
[JsonProperty(PropertyName = "observedGeneration")]
public long? ObservedGeneration { get; set; }
/// <summary>
/// Gets or sets total number of ready pods targeted by this
/// deployment.
/// </summary>
[JsonProperty(PropertyName = "readyReplicas")]
public int? ReadyReplicas { get; set; }
/// <summary>
/// Gets or sets total number of non-terminated pods targeted by this
/// deployment (their labels match the selector).
/// </summary>
[JsonProperty(PropertyName = "replicas")]
public int? Replicas { get; set; }
/// <summary>
/// Gets or sets total number of unavailable pods targeted by this
/// deployment.
/// </summary>
[JsonProperty(PropertyName = "unavailableReplicas")]
public int? UnavailableReplicas { get; set; }
/// <summary>
/// Gets or sets total number of non-terminated pods targeted by this
/// deployment that have the desired template spec.
/// </summary>
[JsonProperty(PropertyName = "updatedReplicas")]
public int? UpdatedReplicas { get; set; }
}
}

View File

@@ -0,0 +1,60 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// DeploymentStrategy describes how to replace existing pods with new
/// ones.
/// </summary>
public partial class Extensionsv1beta1DeploymentStrategy
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1DeploymentStrategy class.
/// </summary>
public Extensionsv1beta1DeploymentStrategy()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1DeploymentStrategy class.
/// </summary>
/// <param name="rollingUpdate">Rolling update config params. Present
/// only if DeploymentStrategyType = RollingUpdate.</param>
/// <param name="type">Type of deployment. Can be "Recreate" or
/// "RollingUpdate". Default is RollingUpdate.</param>
public Extensionsv1beta1DeploymentStrategy(Extensionsv1beta1RollingUpdateDeployment rollingUpdate = default(Extensionsv1beta1RollingUpdateDeployment), string type = default(string))
{
RollingUpdate = rollingUpdate;
Type = type;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets rolling update config params. Present only if
/// DeploymentStrategyType = RollingUpdate.
/// </summary>
[JsonProperty(PropertyName = "rollingUpdate")]
public Extensionsv1beta1RollingUpdateDeployment RollingUpdate { get; set; }
/// <summary>
/// Gets or sets type of deployment. Can be "Recreate" or
/// "RollingUpdate". Default is RollingUpdate.
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
}
}

View File

@@ -0,0 +1,46 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
public partial class Extensionsv1beta1RollbackConfig
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1RollbackConfig
/// class.
/// </summary>
public Extensionsv1beta1RollbackConfig()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1RollbackConfig
/// class.
/// </summary>
/// <param name="revision">The revision to rollback to. If set to 0,
/// rollbck to the last revision.</param>
public Extensionsv1beta1RollbackConfig(long? revision = default(long?))
{
Revision = revision;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the revision to rollback to. If set to 0, rollbck to
/// the last revision.
/// </summary>
[JsonProperty(PropertyName = "revision")]
public long? Revision { get; set; }
}
}

View File

@@ -0,0 +1,94 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Spec to control the desired behavior of rolling update.
/// </summary>
public partial class Extensionsv1beta1RollingUpdateDeployment
{
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1RollingUpdateDeployment class.
/// </summary>
public Extensionsv1beta1RollingUpdateDeployment()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Extensionsv1beta1RollingUpdateDeployment class.
/// </summary>
/// <param name="maxSurge">The maximum number of pods that can be
/// scheduled above the desired number of pods. Value can be an
/// absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
/// This can not be 0 if MaxUnavailable is 0. Absolute number is
/// calculated from percentage by rounding up. By default, a value of 1
/// is used. Example: when this is set to 30%, the new RC can be scaled
/// up immediately when the rolling update 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 can be scaled up further,
/// ensuring that total number of pods running at any time during the
/// update is atmost 130% of desired pods.</param>
/// <param name="maxUnavailable">The maximum number of pods that can be
/// unavailable during the update. Value can be an absolute number (ex:
/// 5) or a percentage of desired pods (ex: 10%). Absolute number is
/// calculated from percentage by rounding down. This can not be 0 if
/// MaxSurge is 0. By default, a fixed value of 1 is used. Example:
/// when this is set to 30%, the old RC can be scaled down to 70% of
/// desired pods immediately when the rolling update starts. Once new
/// pods are ready, old RC can be scaled down further, followed by
/// scaling up the new RC, ensuring that the total number of pods
/// available at all times during the update is at least 70% of desired
/// pods.</param>
public Extensionsv1beta1RollingUpdateDeployment(string maxSurge = default(string), string maxUnavailable = default(string))
{
MaxSurge = maxSurge;
MaxUnavailable = maxUnavailable;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the maximum number of pods that can be scheduled above
/// the desired number of pods. Value can be an absolute number (ex: 5)
/// or a percentage of desired pods (ex: 10%). This can not be 0 if
/// MaxUnavailable is 0. Absolute number is calculated from percentage
/// by rounding up. By default, a value of 1 is used. Example: when
/// this is set to 30%, the new RC can be scaled up immediately when
/// the rolling update 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 can be scaled up further, ensuring that total
/// number of pods running at any time during the update is atmost 130%
/// of desired pods.
/// </summary>
[JsonProperty(PropertyName = "maxSurge")]
public string MaxSurge { get; set; }
/// <summary>
/// Gets or sets the maximum number of pods that can be unavailable
/// during the update. Value can be an absolute number (ex: 5) or a
/// percentage of desired pods (ex: 10%). Absolute number is calculated
/// from percentage by rounding down. This can not be 0 if MaxSurge is
/// 0. By default, a fixed value of 1 is used. Example: when this is
/// set to 30%, the old RC can be scaled down to 70% of desired pods
/// immediately when the rolling update starts. Once new pods are
/// ready, old RC can be scaled down further, followed by scaling up
/// the new RC, ensuring that the total number of pods available at all
/// times during the update is at least 70% of desired pods.
/// </summary>
[JsonProperty(PropertyName = "maxUnavailable")]
public string MaxUnavailable { get; set; }
}
}

View File

@@ -0,0 +1,114 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// represents a scaling request for a resource.
/// </summary>
public partial class Extensionsv1beta1Scale
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1Scale class.
/// </summary>
public Extensionsv1beta1Scale()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1Scale 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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object metadata; More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.</param>
/// <param name="spec">defines the behavior of the scale. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.</param>
/// <param name="status">current status of the scale. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
/// Read-only.</param>
public Extensionsv1beta1Scale(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Extensionsv1beta1ScaleSpec spec = default(Extensionsv1beta1ScaleSpec), Extensionsv1beta1ScaleStatus status = default(Extensionsv1beta1ScaleStatus))
{
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard object metadata; More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets defines the behavior of the scale. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
/// </summary>
[JsonProperty(PropertyName = "spec")]
public Extensionsv1beta1ScaleSpec Spec { get; set; }
/// <summary>
/// Gets or sets current status of the scale. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
/// Read-only.
/// </summary>
[JsonProperty(PropertyName = "status")]
public Extensionsv1beta1ScaleStatus Status { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Status != null)
{
Status.Validate();
}
}
}
}

View File

@@ -0,0 +1,46 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// describes the attributes of a scale subresource
/// </summary>
public partial class Extensionsv1beta1ScaleSpec
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1ScaleSpec class.
/// </summary>
public Extensionsv1beta1ScaleSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1ScaleSpec class.
/// </summary>
/// <param name="replicas">desired number of instances for the scaled
/// object.</param>
public Extensionsv1beta1ScaleSpec(int? replicas = default(int?))
{
Replicas = replicas;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets desired number of instances for the scaled object.
/// </summary>
[JsonProperty(PropertyName = "replicas")]
public int? Replicas { get; set; }
}
}

View File

@@ -0,0 +1,94 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// represents the current status of a scale subresource.
/// </summary>
public partial class Extensionsv1beta1ScaleStatus
{
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1ScaleStatus
/// class.
/// </summary>
public Extensionsv1beta1ScaleStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the Extensionsv1beta1ScaleStatus
/// class.
/// </summary>
/// <param name="replicas">actual number of observed instances of the
/// scaled object.</param>
/// <param name="selector">label query over pods that should match the
/// replicas count. More info:
/// http://kubernetes.io/docs/user-guide/labels#label-selectors</param>
/// <param name="targetSelector">label selector for pods that should
/// match the replicas count. This is a serializated version of both
/// map-based and more expressive set-based selectors. This is done to
/// avoid introspection in the clients. The string will be in the same
/// format as the query-param syntax. If the target type only supports
/// map-based selectors, both this field and map-based selector field
/// are populated. More info:
/// http://kubernetes.io/docs/user-guide/labels#label-selectors</param>
public Extensionsv1beta1ScaleStatus(int replicas, IDictionary<string, string> selector = default(IDictionary<string, string>), string targetSelector = default(string))
{
Replicas = replicas;
Selector = selector;
TargetSelector = targetSelector;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets actual number of observed instances of the scaled
/// object.
/// </summary>
[JsonProperty(PropertyName = "replicas")]
public int Replicas { get; set; }
/// <summary>
/// Gets or sets label query over pods that should match the replicas
/// count. More info:
/// http://kubernetes.io/docs/user-guide/labels#label-selectors
/// </summary>
[JsonProperty(PropertyName = "selector")]
public IDictionary<string, string> Selector { get; set; }
/// <summary>
/// Gets or sets label selector for pods that should match the replicas
/// count. This is a serializated version of both map-based and more
/// expressive set-based selectors. This is done to avoid introspection
/// in the clients. The string will be in the same format as the
/// query-param syntax. If the target type only supports map-based
/// selectors, both this field and map-based selector field are
/// populated. More info:
/// http://kubernetes.io/docs/user-guide/labels#label-selectors
/// </summary>
[JsonProperty(PropertyName = "targetSelector")]
public string TargetSelector { 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,96 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// RawExtension is used to hold extensions in external versions.
///
/// To use this, make a field which has RawExtension as its type in your
/// external, versioned struct, and Object in your internal struct. You
/// also need to register your various plugin types.
///
/// // Internal package: type MyAPIObject struct {
/// runtime.TypeMeta `json:",inline"`
/// MyPlugin runtime.Object `json:"myPlugin"`
/// } type PluginA struct {
/// AOption string `json:"aOption"`
/// }
///
/// // External package: type MyAPIObject struct {
/// runtime.TypeMeta `json:",inline"`
/// MyPlugin runtime.RawExtension `json:"myPlugin"`
/// } type PluginA struct {
/// AOption string `json:"aOption"`
/// }
///
/// // On the wire, the JSON will look something like this: {
/// "kind":"MyAPIObject",
/// "apiVersion":"v1",
/// "myPlugin": {
/// "kind":"PluginA",
/// "aOption":"foo",
/// },
/// }
///
/// So what happens? Decode first uses json or yaml to unmarshal the
/// serialized data into your external MyAPIObject. That causes the raw
/// JSON to be stored, but not unpacked. The next step is to copy (using
/// pkg/conversion) into the internal struct. The runtime package's
/// DefaultScheme has conversion functions installed which will unpack the
/// JSON stored in RawExtension, turning it into the correct object type,
/// and storing it in the Object. (TODO: In the case where the object is of
/// an unknown type, a runtime.Unknown object will be created and stored.)
/// </summary>
public partial class RuntimeRawExtension
{
/// <summary>
/// Initializes a new instance of the RuntimeRawExtension class.
/// </summary>
public RuntimeRawExtension()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the RuntimeRawExtension class.
/// </summary>
/// <param name="raw">Raw is the underlying serialization of this
/// object.</param>
public RuntimeRawExtension(byte[] raw)
{
Raw = raw;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets raw is the underlying serialization of this object.
/// </summary>
[JsonProperty(PropertyName = "Raw")]
public byte[] Raw { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Raw == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Raw");
}
}
}
}

View File

@@ -0,0 +1,173 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// APIGroup contains the name, the supported versions, and the preferred
/// version of a group.
/// </summary>
public partial class V1APIGroup
{
/// <summary>
/// Initializes a new instance of the V1APIGroup class.
/// </summary>
public V1APIGroup()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIGroup class.
/// </summary>
/// <param name="name">name is the name of the group.</param>
/// <param name="serverAddressByClientCIDRs">a map of client CIDR to
/// server address that is serving this group. This is to help clients
/// reach servers in the most network-efficient way possible. Clients
/// can use the appropriate server address as per the CIDR that they
/// match. In case of multiple matches, clients should use the longest
/// matching CIDR. The server returns only those CIDRs that it thinks
/// that the client can match. For example: the master will return an
/// internal IP CIDR only, if the client reaches the server using an
/// internal IP. Server looks at X-Forwarded-For header or X-Real-Ip
/// header or request.RemoteAddr (in that order) to get the client
/// IP.</param>
/// <param name="versions">versions are the versions supported in this
/// group.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="preferredVersion">preferredVersion is the version
/// preferred by the API server, which probably is the storage
/// version.</param>
public V1APIGroup(string name, IList<V1ServerAddressByClientCIDR> serverAddressByClientCIDRs, IList<V1GroupVersionForDiscovery> versions, string apiVersion = default(string), string kind = default(string), V1GroupVersionForDiscovery preferredVersion = default(V1GroupVersionForDiscovery))
{
ApiVersion = apiVersion;
Kind = kind;
Name = name;
PreferredVersion = preferredVersion;
ServerAddressByClientCIDRs = serverAddressByClientCIDRs;
Versions = versions;
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets name is the name of the group.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets preferredVersion is the version preferred by the API
/// server, which probably is the storage version.
/// </summary>
[JsonProperty(PropertyName = "preferredVersion")]
public V1GroupVersionForDiscovery PreferredVersion { get; set; }
/// <summary>
/// Gets or sets a map of client CIDR to server address that is serving
/// this group. This is to help clients reach servers in the most
/// network-efficient way possible. Clients can use the appropriate
/// server address as per the CIDR that they match. In case of multiple
/// matches, clients should use the longest matching CIDR. The server
/// returns only those CIDRs that it thinks that the client can match.
/// For example: the master will return an internal IP CIDR only, if
/// the client reaches the server using an internal IP. Server looks at
/// X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr
/// (in that order) to get the client IP.
/// </summary>
[JsonProperty(PropertyName = "serverAddressByClientCIDRs")]
public IList<V1ServerAddressByClientCIDR> ServerAddressByClientCIDRs { get; set; }
/// <summary>
/// Gets or sets versions are the versions supported in this group.
/// </summary>
[JsonProperty(PropertyName = "versions")]
public IList<V1GroupVersionForDiscovery> Versions { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (ServerAddressByClientCIDRs == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ServerAddressByClientCIDRs");
}
if (Versions == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Versions");
}
if (PreferredVersion != null)
{
PreferredVersion.Validate();
}
if (ServerAddressByClientCIDRs != null)
{
foreach (var element in ServerAddressByClientCIDRs)
{
if (element != null)
{
element.Validate();
}
}
}
if (Versions != null)
{
foreach (var element1 in Versions)
{
if (element1 != null)
{
element1.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,104 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// APIGroupList is a list of APIGroup, to allow clients to discover the
/// API at /apis.
/// </summary>
public partial class V1APIGroupList
{
/// <summary>
/// Initializes a new instance of the V1APIGroupList class.
/// </summary>
public V1APIGroupList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIGroupList class.
/// </summary>
/// <param name="groups">groups is a list of APIGroup.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
public V1APIGroupList(IList<V1APIGroup> groups, string apiVersion = default(string), string kind = default(string))
{
ApiVersion = apiVersion;
Groups = groups;
Kind = kind;
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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets groups is a list of APIGroup.
/// </summary>
[JsonProperty(PropertyName = "groups")]
public IList<V1APIGroup> Groups { 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Groups == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Groups");
}
if (Groups != null)
{
foreach (var element in Groups)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,112 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// APIResource specifies the name of a resource and whether it is
/// namespaced.
/// </summary>
public partial class V1APIResource
{
/// <summary>
/// Initializes a new instance of the V1APIResource class.
/// </summary>
public V1APIResource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIResource class.
/// </summary>
/// <param name="kind">kind is the kind for the resource (e.g. 'Foo' is
/// the kind for a resource 'foo')</param>
/// <param name="name">name is the name of the resource.</param>
/// <param name="namespaced">namespaced indicates if a resource is
/// namespaced or not.</param>
/// <param name="verbs">verbs is a list of supported kube verbs (this
/// includes get, list, watch, create, update, patch, delete,
/// deletecollection, and proxy)</param>
/// <param name="shortNames">shortNames is a list of suggested short
/// names of the resource.</param>
public V1APIResource(string kind, string name, bool namespaced, IList<string> verbs, IList<string> shortNames = default(IList<string>))
{
Kind = kind;
Name = name;
Namespaced = namespaced;
ShortNames = shortNames;
Verbs = verbs;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets kind is the kind for the resource (e.g. 'Foo' is the
/// kind for a resource 'foo')
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets name is the name of the resource.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets namespaced indicates if a resource is namespaced or
/// not.
/// </summary>
[JsonProperty(PropertyName = "namespaced")]
public bool Namespaced { get; set; }
/// <summary>
/// Gets or sets shortNames is a list of suggested short names of the
/// resource.
/// </summary>
[JsonProperty(PropertyName = "shortNames")]
public IList<string> ShortNames { get; set; }
/// <summary>
/// Gets or sets verbs is a list of supported kube verbs (this includes
/// get, list, watch, create, update, patch, delete, deletecollection,
/// and proxy)
/// </summary>
[JsonProperty(PropertyName = "verbs")]
public IList<string> Verbs { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Kind == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Kind");
}
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (Verbs == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Verbs");
}
}
}
}

View File

@@ -0,0 +1,121 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// APIResourceList is a list of APIResource, it is used to expose the name
/// of the resources supported in a specific group and version, and if the
/// resource is namespaced.
/// </summary>
public partial class V1APIResourceList
{
/// <summary>
/// Initializes a new instance of the V1APIResourceList class.
/// </summary>
public V1APIResourceList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIResourceList class.
/// </summary>
/// <param name="groupVersion">groupVersion is the group and version
/// this APIResourceList is for.</param>
/// <param name="resources">resources contains the name of the
/// resources and if they are namespaced.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
public V1APIResourceList(string groupVersion, IList<V1APIResource> resources, string apiVersion = default(string), string kind = default(string))
{
ApiVersion = apiVersion;
GroupVersion = groupVersion;
Kind = kind;
Resources = resources;
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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets groupVersion is the group and version this
/// APIResourceList is for.
/// </summary>
[JsonProperty(PropertyName = "groupVersion")]
public string GroupVersion { 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets resources contains the name of the resources and if
/// they are namespaced.
/// </summary>
[JsonProperty(PropertyName = "resources")]
public IList<V1APIResource> Resources { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (GroupVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "GroupVersion");
}
if (Resources == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Resources");
}
if (Resources != null)
{
foreach (var element in Resources)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,136 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// APIVersions lists the versions that are available, to allow clients to
/// discover the API at /api, which is the root path of the legacy v1 API.
/// </summary>
public partial class V1APIVersions
{
/// <summary>
/// Initializes a new instance of the V1APIVersions class.
/// </summary>
public V1APIVersions()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1APIVersions class.
/// </summary>
/// <param name="serverAddressByClientCIDRs">a map of client CIDR to
/// server address that is serving this group. This is to help clients
/// reach servers in the most network-efficient way possible. Clients
/// can use the appropriate server address as per the CIDR that they
/// match. In case of multiple matches, clients should use the longest
/// matching CIDR. The server returns only those CIDRs that it thinks
/// that the client can match. For example: the master will return an
/// internal IP CIDR only, if the client reaches the server using an
/// internal IP. Server looks at X-Forwarded-For header or X-Real-Ip
/// header or request.RemoteAddr (in that order) to get the client
/// IP.</param>
/// <param name="versions">versions are the api versions that are
/// available.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
public V1APIVersions(IList<V1ServerAddressByClientCIDR> serverAddressByClientCIDRs, IList<string> versions, string apiVersion = default(string), string kind = default(string))
{
ApiVersion = apiVersion;
Kind = kind;
ServerAddressByClientCIDRs = serverAddressByClientCIDRs;
Versions = versions;
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets a map of client CIDR to server address that is serving
/// this group. This is to help clients reach servers in the most
/// network-efficient way possible. Clients can use the appropriate
/// server address as per the CIDR that they match. In case of multiple
/// matches, clients should use the longest matching CIDR. The server
/// returns only those CIDRs that it thinks that the client can match.
/// For example: the master will return an internal IP CIDR only, if
/// the client reaches the server using an internal IP. Server looks at
/// X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr
/// (in that order) to get the client IP.
/// </summary>
[JsonProperty(PropertyName = "serverAddressByClientCIDRs")]
public IList<V1ServerAddressByClientCIDR> ServerAddressByClientCIDRs { get; set; }
/// <summary>
/// Gets or sets versions are the api versions that are available.
/// </summary>
[JsonProperty(PropertyName = "versions")]
public IList<string> Versions { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (ServerAddressByClientCIDRs == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ServerAddressByClientCIDRs");
}
if (Versions == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Versions");
}
if (ServerAddressByClientCIDRs != null)
{
foreach (var element in ServerAddressByClientCIDRs)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,116 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Represents a Persistent Disk resource in AWS.
///
/// An AWS EBS disk must exist before mounting to a container. The disk
/// must also be in the same AWS zone as the kubelet. An AWS EBS disk can
/// only be mounted as read/write once. AWS EBS volumes support ownership
/// management and SELinux relabeling.
/// </summary>
public partial class V1AWSElasticBlockStoreVolumeSource
{
/// <summary>
/// Initializes a new instance of the
/// V1AWSElasticBlockStoreVolumeSource class.
/// </summary>
public V1AWSElasticBlockStoreVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// V1AWSElasticBlockStoreVolumeSource class.
/// </summary>
/// <param name="volumeID">Unique ID of the persistent disk resource in
/// AWS (Amazon EBS volume). More info:
/// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore</param>
/// <param name="fsType">Filesystem type of the volume that you want to
/// mount. Tip: Ensure that the filesystem type is supported by the
/// host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly
/// inferred to be "ext4" if unspecified. More info:
/// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore</param>
/// <param name="partition">The partition in the volume that you want
/// to mount. If omitted, the default is to mount by volume name.
/// Examples: For volume /dev/sda1, you specify the partition as "1".
/// Similarly, the volume partition for /dev/sda is "0" (or you can
/// leave the property empty).</param>
/// <param name="readOnlyProperty">Specify "true" to force and set the
/// ReadOnly property in VolumeMounts to "true". If omitted, the
/// default is "false". More info:
/// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore</param>
public V1AWSElasticBlockStoreVolumeSource(string volumeID, string fsType = default(string), int? partition = default(int?), bool? readOnlyProperty = default(bool?))
{
FsType = fsType;
Partition = partition;
ReadOnlyProperty = readOnlyProperty;
VolumeID = volumeID;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets filesystem type of the volume that you want to mount.
/// Tip: Ensure that the filesystem type is supported by the host
/// operating system. Examples: "ext4", "xfs", "ntfs". Implicitly
/// inferred to be "ext4" if unspecified. More info:
/// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore
/// </summary>
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }
/// <summary>
/// Gets or sets the partition in the volume that you want to mount. If
/// omitted, the default is to mount by volume name. Examples: For
/// volume /dev/sda1, you specify the partition as "1". Similarly, the
/// volume partition for /dev/sda is "0" (or you can leave the property
/// empty).
/// </summary>
[JsonProperty(PropertyName = "partition")]
public int? Partition { get; set; }
/// <summary>
/// Gets or sets specify "true" to force and set the ReadOnly property
/// in VolumeMounts to "true". If omitted, the default is "false". More
/// info:
/// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore
/// </summary>
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Gets or sets unique ID of the persistent disk resource in AWS
/// (Amazon EBS volume). More info:
/// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore
/// </summary>
[JsonProperty(PropertyName = "volumeID")]
public string VolumeID { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (VolumeID == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "VolumeID");
}
}
}
}

View File

@@ -0,0 +1,83 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Affinity is a group of affinity scheduling rules.
/// </summary>
public partial class V1Affinity
{
/// <summary>
/// Initializes a new instance of the V1Affinity class.
/// </summary>
public V1Affinity()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1Affinity class.
/// </summary>
/// <param name="nodeAffinity">Describes node affinity scheduling rules
/// for the pod.</param>
/// <param name="podAffinity">Describes pod affinity scheduling rules
/// (e.g. co-locate this pod in the same node, zone, etc. as some other
/// pod(s)).</param>
/// <param name="podAntiAffinity">Describes pod anti-affinity
/// scheduling rules (e.g. avoid putting this pod in the same node,
/// zone, etc. as some other pod(s)).</param>
public V1Affinity(V1NodeAffinity nodeAffinity = default(V1NodeAffinity), V1PodAffinity podAffinity = default(V1PodAffinity), V1PodAntiAffinity podAntiAffinity = default(V1PodAntiAffinity))
{
NodeAffinity = nodeAffinity;
PodAffinity = podAffinity;
PodAntiAffinity = podAntiAffinity;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets describes node affinity scheduling rules for the pod.
/// </summary>
[JsonProperty(PropertyName = "nodeAffinity")]
public V1NodeAffinity NodeAffinity { get; set; }
/// <summary>
/// Gets or sets describes pod affinity scheduling rules (e.g.
/// co-locate this pod in the same node, zone, etc. as some other
/// pod(s)).
/// </summary>
[JsonProperty(PropertyName = "podAffinity")]
public V1PodAffinity PodAffinity { get; set; }
/// <summary>
/// Gets or sets describes pod anti-affinity scheduling rules (e.g.
/// avoid putting this pod in the same node, zone, etc. as some other
/// pod(s)).
/// </summary>
[JsonProperty(PropertyName = "podAntiAffinity")]
public V1PodAntiAffinity PodAntiAffinity { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (NodeAffinity != null)
{
NodeAffinity.Validate();
}
}
}
}

View File

@@ -0,0 +1,73 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// AttachedVolume describes a volume attached to a node
/// </summary>
public partial class V1AttachedVolume
{
/// <summary>
/// Initializes a new instance of the V1AttachedVolume class.
/// </summary>
public V1AttachedVolume()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1AttachedVolume class.
/// </summary>
/// <param name="devicePath">DevicePath represents the device path
/// where the volume should be available</param>
/// <param name="name">Name of the attached volume</param>
public V1AttachedVolume(string devicePath, string name)
{
DevicePath = devicePath;
Name = name;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets devicePath represents the device path where the volume
/// should be available
/// </summary>
[JsonProperty(PropertyName = "devicePath")]
public string DevicePath { get; set; }
/// <summary>
/// Gets or sets name of the attached volume
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (DevicePath == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "DevicePath");
}
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
}
}
}

View File

@@ -0,0 +1,106 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// AzureDisk represents an Azure Data Disk mount on the host and bind
/// mount to the pod.
/// </summary>
public partial class V1AzureDiskVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1AzureDiskVolumeSource class.
/// </summary>
public V1AzureDiskVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1AzureDiskVolumeSource class.
/// </summary>
/// <param name="diskName">The Name of the data disk in the blob
/// storage</param>
/// <param name="diskURI">The URI the data disk in the blob
/// storage</param>
/// <param name="cachingMode">Host Caching mode: None, Read Only, Read
/// Write.</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="readOnlyProperty">Defaults to false (read/write).
/// ReadOnly here will force the ReadOnly setting in
/// VolumeMounts.</param>
public V1AzureDiskVolumeSource(string diskName, string diskURI, string cachingMode = default(string), string fsType = default(string), bool? readOnlyProperty = default(bool?))
{
CachingMode = cachingMode;
DiskName = diskName;
DiskURI = diskURI;
FsType = fsType;
ReadOnlyProperty = readOnlyProperty;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets host Caching mode: None, Read Only, Read Write.
/// </summary>
[JsonProperty(PropertyName = "cachingMode")]
public string CachingMode { get; set; }
/// <summary>
/// Gets or sets the Name of the data disk in the blob storage
/// </summary>
[JsonProperty(PropertyName = "diskName")]
public string DiskName { get; set; }
/// <summary>
/// Gets or sets the URI the data disk in the blob storage
/// </summary>
[JsonProperty(PropertyName = "diskURI")]
public string DiskURI { 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 defaults to false (read/write). ReadOnly here will
/// force the ReadOnly setting in VolumeMounts.
/// </summary>
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (DiskName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "DiskName");
}
if (DiskURI == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "DiskURI");
}
}
}
}

View File

@@ -0,0 +1,85 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// AzureFile represents an Azure File Service mount on the host and bind
/// mount to the pod.
/// </summary>
public partial class V1AzureFileVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1AzureFileVolumeSource class.
/// </summary>
public V1AzureFileVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1AzureFileVolumeSource class.
/// </summary>
/// <param name="secretName">the name of secret that contains Azure
/// Storage Account Name and Key</param>
/// <param name="shareName">Share Name</param>
/// <param name="readOnlyProperty">Defaults to false (read/write).
/// ReadOnly here will force the ReadOnly setting in
/// VolumeMounts.</param>
public V1AzureFileVolumeSource(string secretName, string shareName, bool? readOnlyProperty = default(bool?))
{
ReadOnlyProperty = readOnlyProperty;
SecretName = secretName;
ShareName = shareName;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets 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 the name of secret that contains Azure Storage Account
/// Name and Key
/// </summary>
[JsonProperty(PropertyName = "secretName")]
public string SecretName { get; set; }
/// <summary>
/// Gets or sets share Name
/// </summary>
[JsonProperty(PropertyName = "shareName")]
public string ShareName { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (SecretName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "SecretName");
}
if (ShareName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ShareName");
}
}
}
}

104
src/generated/Models/V1Binding.cs Executable file
View File

@@ -0,0 +1,104 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Binding ties one object to another. For example, a pod is bound to a
/// node by a scheduler.
/// </summary>
public partial class V1Binding
{
/// <summary>
/// Initializes a new instance of the V1Binding class.
/// </summary>
public V1Binding()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1Binding class.
/// </summary>
/// <param name="target">The target object that you want to bind to the
/// standard object.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</param>
public V1Binding(V1ObjectReference target, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta))
{
ApiVersion = apiVersion;
Kind = kind;
Metadata = metadata;
Target = target;
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets the target object that you want to bind to the
/// standard object.
/// </summary>
[JsonProperty(PropertyName = "target")]
public V1ObjectReference Target { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Target == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Target");
}
}
}
}

View File

@@ -0,0 +1,55 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Adds and removes POSIX capabilities from running containers.
/// </summary>
public partial class V1Capabilities
{
/// <summary>
/// Initializes a new instance of the V1Capabilities class.
/// </summary>
public V1Capabilities()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1Capabilities class.
/// </summary>
/// <param name="add">Added capabilities</param>
/// <param name="drop">Removed capabilities</param>
public V1Capabilities(IList<string> add = default(IList<string>), IList<string> drop = default(IList<string>))
{
Add = add;
Drop = drop;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets added capabilities
/// </summary>
[JsonProperty(PropertyName = "add")]
public IList<string> Add { get; set; }
/// <summary>
/// Gets or sets removed capabilities
/// </summary>
[JsonProperty(PropertyName = "drop")]
public IList<string> Drop { get; set; }
}
}

View File

@@ -0,0 +1,126 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
/// Cephfs volumes do not support ownership management or SELinux
/// relabeling.
/// </summary>
public partial class V1CephFSVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1CephFSVolumeSource class.
/// </summary>
public V1CephFSVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1CephFSVolumeSource class.
/// </summary>
/// <param name="monitors">Required: Monitors is a collection of Ceph
/// monitors More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it</param>
/// <param name="path">Optional: Used as the mounted root, rather than
/// the full Ceph tree, default is /</param>
/// <param name="readOnlyProperty">Optional: Defaults to false
/// (read/write). ReadOnly here will force the ReadOnly setting in
/// VolumeMounts. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it</param>
/// <param name="secretFile">Optional: SecretFile is the path to key
/// ring for User, default is /etc/ceph/user.secret More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it</param>
/// <param name="secretRef">Optional: SecretRef is reference to the
/// authentication secret for User, default is empty. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it</param>
/// <param name="user">Optional: User is the rados user name, default
/// is admin More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it</param>
public V1CephFSVolumeSource(IList<string> monitors, string path = default(string), bool? readOnlyProperty = default(bool?), string secretFile = default(string), V1LocalObjectReference secretRef = default(V1LocalObjectReference), string user = default(string))
{
Monitors = monitors;
Path = path;
ReadOnlyProperty = readOnlyProperty;
SecretFile = secretFile;
SecretRef = secretRef;
User = user;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets required: Monitors is a collection of Ceph monitors
/// More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
/// </summary>
[JsonProperty(PropertyName = "monitors")]
public IList<string> Monitors { get; set; }
/// <summary>
/// Gets or sets optional: Used as the mounted root, rather than the
/// full Ceph tree, default is /
/// </summary>
[JsonProperty(PropertyName = "path")]
public string Path { get; set; }
/// <summary>
/// Gets or sets optional: Defaults to false (read/write). ReadOnly
/// here will force the ReadOnly setting in VolumeMounts. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
/// </summary>
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Gets or sets optional: SecretFile is the path to key ring for User,
/// default is /etc/ceph/user.secret More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
/// </summary>
[JsonProperty(PropertyName = "secretFile")]
public string SecretFile { get; set; }
/// <summary>
/// Gets or sets optional: SecretRef is reference to the authentication
/// secret for User, default is empty. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
/// </summary>
[JsonProperty(PropertyName = "secretRef")]
public V1LocalObjectReference SecretRef { get; set; }
/// <summary>
/// Gets or sets optional: User is the rados user name, default is
/// admin More info:
/// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
/// </summary>
[JsonProperty(PropertyName = "user")]
public string User { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Monitors == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Monitors");
}
}
}
}

View File

@@ -0,0 +1,94 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Represents a cinder volume resource in Openstack. A Cinder volume must
/// exist before mounting to a container. The volume must also be in the
/// same region as the kubelet. Cinder volumes support ownership management
/// and SELinux relabeling.
/// </summary>
public partial class V1CinderVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1CinderVolumeSource class.
/// </summary>
public V1CinderVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1CinderVolumeSource class.
/// </summary>
/// <param name="volumeID">volume id used to identify the volume in
/// cinder More info:
/// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md</param>
/// <param name="fsType">Filesystem type to mount. Must be a filesystem
/// type supported by the host operating system. Examples: "ext4",
/// "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
/// More info:
/// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md</param>
/// <param name="readOnlyProperty">Optional: Defaults to false
/// (read/write). ReadOnly here will force the ReadOnly setting in
/// VolumeMounts. More info:
/// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md</param>
public V1CinderVolumeSource(string volumeID, string fsType = default(string), bool? readOnlyProperty = default(bool?))
{
FsType = fsType;
ReadOnlyProperty = readOnlyProperty;
VolumeID = volumeID;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets filesystem type to mount. Must be a filesystem type
/// supported by the host operating system. Examples: "ext4", "xfs",
/// "ntfs". Implicitly inferred to be "ext4" if unspecified. More info:
/// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
/// </summary>
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }
/// <summary>
/// Gets or sets optional: Defaults to false (read/write). ReadOnly
/// here will force the ReadOnly setting in VolumeMounts. More info:
/// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
/// </summary>
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Gets or sets volume id used to identify the volume in cinder More
/// info:
/// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
/// </summary>
[JsonProperty(PropertyName = "volumeID")]
public string VolumeID { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (VolumeID == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "VolumeID");
}
}
}
}

View File

@@ -0,0 +1,95 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Information about the condition of a component.
/// </summary>
public partial class V1ComponentCondition
{
/// <summary>
/// Initializes a new instance of the V1ComponentCondition class.
/// </summary>
public V1ComponentCondition()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ComponentCondition class.
/// </summary>
/// <param name="status">Status of the condition for a component. Valid
/// values for "Healthy": "True", "False", or "Unknown".</param>
/// <param name="type">Type of condition for a component. Valid value:
/// "Healthy"</param>
/// <param name="error">Condition error code for a component. For
/// example, a health check error code.</param>
/// <param name="message">Message about the condition for a component.
/// For example, information about a health check.</param>
public V1ComponentCondition(string status, string type, string error = default(string), string message = default(string))
{
Error = error;
Message = message;
Status = status;
Type = type;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets condition error code for a component. For example, a
/// health check error code.
/// </summary>
[JsonProperty(PropertyName = "error")]
public string Error { get; set; }
/// <summary>
/// Gets or sets message about the condition for a component. For
/// example, information about a health check.
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets status of the condition for a component. Valid values
/// for "Healthy": "True", "False", or "Unknown".
/// </summary>
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
/// <summary>
/// Gets or sets type of condition for a component. Valid value:
/// "Healthy"
/// </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,91 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// ComponentStatus (and ComponentStatusList) holds the cluster validation
/// info.
/// </summary>
public partial class V1ComponentStatus
{
/// <summary>
/// Initializes a new instance of the V1ComponentStatus class.
/// </summary>
public V1ComponentStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ComponentStatus 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources</param>
/// <param name="conditions">List of component conditions
/// observed</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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</param>
public V1ComponentStatus(string apiVersion = default(string), IList<V1ComponentCondition> conditions = default(IList<V1ComponentCondition>), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta))
{
ApiVersion = apiVersion;
Conditions = conditions;
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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets list of component conditions observed
/// </summary>
[JsonProperty(PropertyName = "conditions")]
public IList<V1ComponentCondition> Conditions { 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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
}
}

View File

@@ -0,0 +1,104 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Status of all the conditions for the component as a list of
/// ComponentStatus objects.
/// </summary>
public partial class V1ComponentStatusList
{
/// <summary>
/// Initializes a new instance of the V1ComponentStatusList class.
/// </summary>
public V1ComponentStatusList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ComponentStatusList class.
/// </summary>
/// <param name="items">List of ComponentStatus 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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard list metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
public V1ComponentStatusList(IList<V1ComponentStatus> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets list of ComponentStatus objects.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1ComponentStatus> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard list metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </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");
}
}
}
}

View File

@@ -0,0 +1,91 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// ConfigMap holds configuration data for pods to consume.
/// </summary>
public partial class V1ConfigMap
{
/// <summary>
/// Initializes a new instance of the V1ConfigMap class.
/// </summary>
public V1ConfigMap()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ConfigMap 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources</param>
/// <param name="data">Data contains the configuration data. Each key
/// must be a valid DNS_SUBDOMAIN with an optional leading dot.</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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/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))
{
ApiVersion = apiVersion;
Data = data;
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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets data contains the configuration data. Each key must be
/// a valid DNS_SUBDOMAIN with an optional leading dot.
/// </summary>
[JsonProperty(PropertyName = "data")]
public IDictionary<string, string> Data { 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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
}
}

View File

@@ -0,0 +1,60 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ConfigMapEnvSource selects a ConfigMap to populate the environment
/// variables with.
///
/// The contents of the target ConfigMap's Data field will represent the
/// key-value pairs as environment variables.
/// </summary>
public partial class V1ConfigMapEnvSource
{
/// <summary>
/// Initializes a new instance of the V1ConfigMapEnvSource class.
/// </summary>
public V1ConfigMapEnvSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ConfigMapEnvSource class.
/// </summary>
/// <param name="name">Name of the referent. More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names</param>
/// <param name="optional">Specify whether the ConfigMap must be
/// defined</param>
public V1ConfigMapEnvSource(string name = default(string), bool? optional = default(bool?))
{
Name = name;
Optional = optional;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets name of the referent. More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets specify whether the ConfigMap must be defined
/// </summary>
[JsonProperty(PropertyName = "optional")]
public bool? Optional { get; set; }
}
}

View File

@@ -0,0 +1,79 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Selects a key from a ConfigMap.
/// </summary>
public partial class V1ConfigMapKeySelector
{
/// <summary>
/// Initializes a new instance of the V1ConfigMapKeySelector class.
/// </summary>
public V1ConfigMapKeySelector()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ConfigMapKeySelector class.
/// </summary>
/// <param name="key">The key to select.</param>
/// <param name="name">Name of the referent. More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names</param>
/// <param name="optional">Specify whether the ConfigMap or it's key
/// must be defined</param>
public V1ConfigMapKeySelector(string key, string name = default(string), bool? optional = default(bool?))
{
Key = key;
Name = name;
Optional = optional;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the key to select.
/// </summary>
[JsonProperty(PropertyName = "key")]
public string Key { get; set; }
/// <summary>
/// Gets or sets name of the referent. More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets specify whether the ConfigMap or it's key must be
/// defined
/// </summary>
[JsonProperty(PropertyName = "optional")]
public bool? Optional { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Key == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Key");
}
}
}
}

View File

@@ -0,0 +1,103 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// ConfigMapList is a resource containing a list of ConfigMap objects.
/// </summary>
public partial class V1ConfigMapList
{
/// <summary>
/// Initializes a new instance of the V1ConfigMapList class.
/// </summary>
public V1ConfigMapList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ConfigMapList class.
/// </summary>
/// <param name="items">Items is the list of ConfigMaps.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</param>
public V1ConfigMapList(IList<V1ConfigMap> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets items is the list of ConfigMaps.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1ConfigMap> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets more info:
/// http://releases.k8s.io/HEAD/docs/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");
}
}
}
}

View File

@@ -0,0 +1,87 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Adapts a ConfigMap into a projected volume.
///
/// The contents of the target ConfigMap's Data field will be presented in
/// a projected volume as files using the keys in the Data field as the
/// file names, unless the items element is populated with specific
/// mappings of keys to paths. Note that this is identical to a configmap
/// volume source without the default mode.
/// </summary>
public partial class V1ConfigMapProjection
{
/// <summary>
/// Initializes a new instance of the V1ConfigMapProjection class.
/// </summary>
public V1ConfigMapProjection()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ConfigMapProjection class.
/// </summary>
/// <param name="items">If unspecified, each key-value pair in the Data
/// field of the referenced ConfigMap will be projected into the volume
/// as a file whose name is the key and content is the value. If
/// specified, the listed keys will be projected into the specified
/// paths, and unlisted keys will not be present. If a key is specified
/// which is not present in the ConfigMap, the volume setup will error
/// unless it is marked optional. Paths must be relative and may not
/// contain the '..' path or start with '..'.</param>
/// <param name="name">Name of the referent. More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names</param>
/// <param name="optional">Specify whether the ConfigMap or it's keys
/// must be defined</param>
public V1ConfigMapProjection(IList<V1KeyToPath> items = default(IList<V1KeyToPath>), string name = default(string), bool? optional = default(bool?))
{
Items = items;
Name = name;
Optional = optional;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets if unspecified, each key-value pair in the Data field
/// of the referenced ConfigMap will be projected into the volume as a
/// file whose name is the key and content is the value. If specified,
/// the listed keys will be projected into the specified paths, and
/// unlisted keys will not be present. If a key is specified which is
/// not present in the ConfigMap, the volume setup will error unless it
/// is marked optional. Paths must be relative and may not contain the
/// '..' path or start with '..'.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1KeyToPath> Items { get; set; }
/// <summary>
/// Gets or sets name of the referent. More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets specify whether the ConfigMap or it's keys must be
/// defined
/// </summary>
[JsonProperty(PropertyName = "optional")]
public bool? Optional { get; set; }
}
}

View File

@@ -0,0 +1,104 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Adapts a ConfigMap into a volume.
///
/// The contents of the target ConfigMap's Data field will be presented in
/// a volume as files using the keys in the Data field as the file names,
/// unless the items element is populated with specific mappings of keys to
/// paths. ConfigMap volumes support ownership management and SELinux
/// relabeling.
/// </summary>
public partial class V1ConfigMapVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1ConfigMapVolumeSource class.
/// </summary>
public V1ConfigMapVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ConfigMapVolumeSource class.
/// </summary>
/// <param name="defaultMode">Optional: mode bits to use on created
/// files by default. Must be a value between 0 and 0777. Defaults to
/// 0644. Directories within the path are not affected by this setting.
/// This might be in conflict with other options that affect the file
/// mode, like fsGroup, and the result can be other mode bits
/// set.</param>
/// <param name="items">If unspecified, each key-value pair in the Data
/// field of the referenced ConfigMap will be projected into the volume
/// as a file whose name is the key and content is the value. If
/// specified, the listed keys will be projected into the specified
/// paths, and unlisted keys will not be present. If a key is specified
/// which is not present in the ConfigMap, the volume setup will error
/// unless it is marked optional. Paths must be relative and may not
/// contain the '..' path or start with '..'.</param>
/// <param name="name">Name of the referent. More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names</param>
/// <param name="optional">Specify whether the ConfigMap or it's keys
/// must be defined</param>
public V1ConfigMapVolumeSource(int? defaultMode = default(int?), IList<V1KeyToPath> items = default(IList<V1KeyToPath>), string name = default(string), bool? optional = default(bool?))
{
DefaultMode = defaultMode;
Items = items;
Name = name;
Optional = optional;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets optional: mode bits to use on created files by
/// default. Must be a value between 0 and 0777. Defaults to 0644.
/// Directories within the path are not affected by this setting. This
/// might be in conflict with other options that affect the file mode,
/// like fsGroup, and the result can be other mode bits set.
/// </summary>
[JsonProperty(PropertyName = "defaultMode")]
public int? DefaultMode { get; set; }
/// <summary>
/// Gets or sets if unspecified, each key-value pair in the Data field
/// of the referenced ConfigMap will be projected into the volume as a
/// file whose name is the key and content is the value. If specified,
/// the listed keys will be projected into the specified paths, and
/// unlisted keys will not be present. If a key is specified which is
/// not present in the ConfigMap, the volume setup will error unless it
/// is marked optional. Paths must be relative and may not contain the
/// '..' path or start with '..'.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1KeyToPath> Items { get; set; }
/// <summary>
/// Gets or sets name of the referent. More info:
/// http://kubernetes.io/docs/user-guide/identifiers#names
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets specify whether the ConfigMap or it's keys must be
/// defined
/// </summary>
[JsonProperty(PropertyName = "optional")]
public bool? Optional { get; set; }
}
}

View File

@@ -0,0 +1,402 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// A single application container that you want to run within a pod.
/// </summary>
public partial class V1Container
{
/// <summary>
/// Initializes a new instance of the V1Container class.
/// </summary>
public V1Container()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1Container class.
/// </summary>
/// <param name="name">Name of the container specified as a DNS_LABEL.
/// Each container in a pod must have a unique name (DNS_LABEL). Cannot
/// be updated.</param>
/// <param name="args">Arguments to the entrypoint. The docker image's
/// CMD is used if this is not provided. Variable references
/// $(VAR_NAME) are expanded using the container's environment. If a
/// variable cannot be resolved, the reference in the input string will
/// be unchanged. The $(VAR_NAME) syntax can be escaped with a double
/// $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
/// regardless of whether the variable exists or not. Cannot be
/// updated. More info:
/// http://kubernetes.io/docs/user-guide/containers#containers-and-commands</param>
/// <param name="command">Entrypoint array. Not executed within a
/// shell. The docker image's ENTRYPOINT is used if this is not
/// provided. Variable references $(VAR_NAME) are expanded using the
/// container's environment. If a variable cannot be resolved, the
/// reference in the input string will be unchanged. The $(VAR_NAME)
/// syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
/// references will never be expanded, regardless of whether the
/// variable exists or not. Cannot be updated. More info:
/// http://kubernetes.io/docs/user-guide/containers#containers-and-commands</param>
/// <param name="env">List of environment variables to set in the
/// container. Cannot be updated.</param>
/// <param name="envFrom">List of sources to populate environment
/// variables in the container. The keys defined within a source must
/// be a C_IDENTIFIER. All invalid keys will be reported as an event
/// when the container is starting. When a key exists in multiple
/// sources, the value associated with the last source will take
/// precedence. Values defined by an Env with a duplicate key will take
/// precedence. Cannot be updated.</param>
/// <param name="image">Docker image name. More info:
/// http://kubernetes.io/docs/user-guide/images</param>
/// <param name="imagePullPolicy">Image pull policy. One of Always,
/// Never, IfNotPresent. Defaults to Always if :latest tag is
/// specified, or IfNotPresent otherwise. Cannot be updated. More info:
/// http://kubernetes.io/docs/user-guide/images#updating-images</param>
/// <param name="lifecycle">Actions that the management system should
/// take in response to container lifecycle events. Cannot be
/// updated.</param>
/// <param name="livenessProbe">Periodic probe of container liveness.
/// Container will be restarted if the probe fails. Cannot be updated.
/// More info:
/// http://kubernetes.io/docs/user-guide/pod-states#container-probes</param>
/// <param name="ports">List of ports to expose from the container.
/// Exposing a port here gives the system additional information about
/// the network connections a container uses, but is primarily
/// informational. Not specifying a port here DOES NOT prevent that
/// port from being exposed. Any port which is listening on the default
/// "0.0.0.0" address inside a container will be accessible from the
/// network. Cannot be updated.</param>
/// <param name="readinessProbe">Periodic probe of container service
/// readiness. Container will be removed from service endpoints if the
/// probe fails. Cannot be updated. More info:
/// http://kubernetes.io/docs/user-guide/pod-states#container-probes</param>
/// <param name="resources">Compute Resources required by this
/// container. Cannot be updated. More info:
/// http://kubernetes.io/docs/user-guide/persistent-volumes#resources</param>
/// <param name="securityContext">Security options the pod should run
/// with. More info:
/// http://releases.k8s.io/HEAD/docs/design/security_context.md</param>
/// <param name="stdin">Whether this container should allocate a buffer
/// for stdin in the container runtime. If this is not set, reads from
/// stdin in the container will always result in EOF. Default is
/// false.</param>
/// <param name="stdinOnce">Whether the container runtime should close
/// the stdin channel after it has been opened by a single attach. When
/// stdin is true the stdin stream will remain open across multiple
/// attach sessions. If stdinOnce is set to true, stdin is opened on
/// container start, is empty until the first client attaches to stdin,
/// and then remains open and accepts data until the client
/// disconnects, at which time stdin is closed and remains closed until
/// the container is restarted. If this flag is false, a container
/// processes that reads from stdin will never receive an EOF. Default
/// is false</param>
/// <param name="terminationMessagePath">Optional: Path at which the
/// file to which the container's termination message will be written
/// is mounted into the container's filesystem. Message written is
/// intended to be brief final status, such as an assertion failure
/// message. Will be truncated by the node if greater than 4096 bytes.
/// The total message length across all containers will be limited to
/// 12kb. Defaults to /dev/termination-log. Cannot be updated.</param>
/// <param name="terminationMessagePolicy">Indicate how the termination
/// message should be populated. File will use the contents of
/// terminationMessagePath to populate the container status message on
/// both success and failure. FallbackToLogsOnError will use the last
/// chunk of container log output if the termination message file is
/// empty and the container exited with an error. The log output is
/// limited to 2048 bytes or 80 lines, whichever is smaller. Defaults
/// to File. Cannot be updated.</param>
/// <param name="tty">Whether this container should allocate a TTY for
/// itself, also requires 'stdin' to be true. Default is false.</param>
/// <param name="volumeMounts">Pod volumes to mount into the
/// container's filesystem. Cannot be updated.</param>
/// <param name="workingDir">Container's working directory. If not
/// specified, the container runtime's default will be used, which
/// might be configured in the container image. Cannot be
/// updated.</param>
public V1Container(string name, IList<string> args = default(IList<string>), IList<string> command = default(IList<string>), IList<V1EnvVar> env = default(IList<V1EnvVar>), IList<V1EnvFromSource> envFrom = default(IList<V1EnvFromSource>), string image = default(string), string imagePullPolicy = default(string), V1Lifecycle lifecycle = default(V1Lifecycle), V1Probe livenessProbe = default(V1Probe), IList<V1ContainerPort> ports = default(IList<V1ContainerPort>), V1Probe readinessProbe = default(V1Probe), V1ResourceRequirements resources = default(V1ResourceRequirements), V1SecurityContext securityContext = default(V1SecurityContext), bool? stdin = default(bool?), bool? stdinOnce = default(bool?), string terminationMessagePath = default(string), string terminationMessagePolicy = default(string), bool? tty = default(bool?), IList<V1VolumeMount> volumeMounts = default(IList<V1VolumeMount>), string workingDir = default(string))
{
Args = args;
Command = command;
Env = env;
EnvFrom = envFrom;
Image = image;
ImagePullPolicy = imagePullPolicy;
Lifecycle = lifecycle;
LivenessProbe = livenessProbe;
Name = name;
Ports = ports;
ReadinessProbe = readinessProbe;
Resources = resources;
SecurityContext = securityContext;
Stdin = stdin;
StdinOnce = stdinOnce;
TerminationMessagePath = terminationMessagePath;
TerminationMessagePolicy = terminationMessagePolicy;
Tty = tty;
VolumeMounts = volumeMounts;
WorkingDir = workingDir;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets arguments to the entrypoint. The docker image's CMD is
/// used if this is not provided. Variable references $(VAR_NAME) are
/// expanded using the container's environment. If a variable cannot be
/// resolved, the reference in the input string will be unchanged. The
/// $(VAR_NAME) syntax can be escaped with a double $$, ie:
/// $$(VAR_NAME). Escaped references will never be expanded, regardless
/// of whether the variable exists or not. Cannot be updated. More
/// info:
/// http://kubernetes.io/docs/user-guide/containers#containers-and-commands
/// </summary>
[JsonProperty(PropertyName = "args")]
public IList<string> Args { get; set; }
/// <summary>
/// Gets or sets entrypoint array. Not executed within a shell. The
/// docker image's ENTRYPOINT is used if this is not provided. Variable
/// references $(VAR_NAME) are expanded using the container's
/// environment. If a variable cannot be resolved, the reference in the
/// input string will be unchanged. The $(VAR_NAME) syntax can be
/// escaped with a double $$, ie: $$(VAR_NAME). Escaped references will
/// never be expanded, regardless of whether the variable exists or
/// not. Cannot be updated. More info:
/// http://kubernetes.io/docs/user-guide/containers#containers-and-commands
/// </summary>
[JsonProperty(PropertyName = "command")]
public IList<string> Command { get; set; }
/// <summary>
/// Gets or sets list of environment variables to set in the container.
/// Cannot be updated.
/// </summary>
[JsonProperty(PropertyName = "env")]
public IList<V1EnvVar> Env { get; set; }
/// <summary>
/// Gets or sets list of sources to populate environment variables in
/// the container. The keys defined within a source must be a
/// C_IDENTIFIER. All invalid keys will be reported as an event when
/// the container is starting. When a key exists in multiple sources,
/// the value associated with the last source will take precedence.
/// Values defined by an Env with a duplicate key will take precedence.
/// Cannot be updated.
/// </summary>
[JsonProperty(PropertyName = "envFrom")]
public IList<V1EnvFromSource> EnvFrom { get; set; }
/// <summary>
/// Gets or sets docker image name. More info:
/// http://kubernetes.io/docs/user-guide/images
/// </summary>
[JsonProperty(PropertyName = "image")]
public string Image { get; set; }
/// <summary>
/// Gets or sets image pull policy. One of Always, Never, IfNotPresent.
/// Defaults to Always if :latest tag is specified, or IfNotPresent
/// otherwise. Cannot be updated. More info:
/// http://kubernetes.io/docs/user-guide/images#updating-images
/// </summary>
[JsonProperty(PropertyName = "imagePullPolicy")]
public string ImagePullPolicy { get; set; }
/// <summary>
/// Gets or sets actions that the management system should take in
/// response to container lifecycle events. Cannot be updated.
/// </summary>
[JsonProperty(PropertyName = "lifecycle")]
public V1Lifecycle Lifecycle { get; set; }
/// <summary>
/// Gets or sets periodic probe of container liveness. Container will
/// be restarted if the probe fails. Cannot be updated. More info:
/// http://kubernetes.io/docs/user-guide/pod-states#container-probes
/// </summary>
[JsonProperty(PropertyName = "livenessProbe")]
public V1Probe LivenessProbe { get; set; }
/// <summary>
/// Gets or sets name of the container specified as a DNS_LABEL. Each
/// container in a pod must have a unique name (DNS_LABEL). Cannot be
/// updated.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets list of ports to expose from the container. Exposing a
/// port here gives the system additional information about the network
/// connections a container uses, but is primarily informational. Not
/// specifying a port here DOES NOT prevent that port from being
/// exposed. Any port which is listening on the default "0.0.0.0"
/// address inside a container will be accessible from the network.
/// Cannot be updated.
/// </summary>
[JsonProperty(PropertyName = "ports")]
public IList<V1ContainerPort> Ports { get; set; }
/// <summary>
/// Gets or sets periodic probe of container service readiness.
/// Container will be removed from service endpoints if the probe
/// fails. Cannot be updated. More info:
/// http://kubernetes.io/docs/user-guide/pod-states#container-probes
/// </summary>
[JsonProperty(PropertyName = "readinessProbe")]
public V1Probe ReadinessProbe { get; set; }
/// <summary>
/// Gets or sets compute Resources required by this container. Cannot
/// be updated. More info:
/// http://kubernetes.io/docs/user-guide/persistent-volumes#resources
/// </summary>
[JsonProperty(PropertyName = "resources")]
public V1ResourceRequirements Resources { get; set; }
/// <summary>
/// Gets or sets security options the pod should run with. More info:
/// http://releases.k8s.io/HEAD/docs/design/security_context.md
/// </summary>
[JsonProperty(PropertyName = "securityContext")]
public V1SecurityContext SecurityContext { get; set; }
/// <summary>
/// Gets or sets whether this container should allocate a buffer for
/// stdin in the container runtime. If this is not set, reads from
/// stdin in the container will always result in EOF. Default is false.
/// </summary>
[JsonProperty(PropertyName = "stdin")]
public bool? Stdin { get; set; }
/// <summary>
/// Gets or sets whether the container runtime should close the stdin
/// channel after it has been opened by a single attach. When stdin is
/// true the stdin stream will remain open across multiple attach
/// sessions. If stdinOnce is set to true, stdin is opened on container
/// start, is empty until the first client attaches to stdin, and then
/// remains open and accepts data until the client disconnects, at
/// which time stdin is closed and remains closed until the container
/// is restarted. If this flag is false, a container processes that
/// reads from stdin will never receive an EOF. Default is false
/// </summary>
[JsonProperty(PropertyName = "stdinOnce")]
public bool? StdinOnce { get; set; }
/// <summary>
/// Gets or sets optional: Path at which the file to which the
/// container's termination message will be written is mounted into the
/// container's filesystem. Message written is intended to be brief
/// final status, such as an assertion failure message. Will be
/// truncated by the node if greater than 4096 bytes. The total message
/// length across all containers will be limited to 12kb. Defaults to
/// /dev/termination-log. Cannot be updated.
/// </summary>
[JsonProperty(PropertyName = "terminationMessagePath")]
public string TerminationMessagePath { get; set; }
/// <summary>
/// Gets or sets indicate how the termination message should be
/// populated. File will use the contents of terminationMessagePath to
/// populate the container status message on both success and failure.
/// FallbackToLogsOnError will use the last chunk of container log
/// output if the termination message file is empty and the container
/// exited with an error. The log output is limited to 2048 bytes or 80
/// lines, whichever is smaller. Defaults to File. Cannot be updated.
/// </summary>
[JsonProperty(PropertyName = "terminationMessagePolicy")]
public string TerminationMessagePolicy { get; set; }
/// <summary>
/// Gets or sets whether this container should allocate a TTY for
/// itself, also requires 'stdin' to be true. Default is false.
/// </summary>
[JsonProperty(PropertyName = "tty")]
public bool? Tty { get; set; }
/// <summary>
/// Gets or sets pod volumes to mount into the container's filesystem.
/// Cannot be updated.
/// </summary>
[JsonProperty(PropertyName = "volumeMounts")]
public IList<V1VolumeMount> VolumeMounts { get; set; }
/// <summary>
/// Gets or sets container's working directory. If not specified, the
/// container runtime's default will be used, which might be configured
/// in the container image. Cannot be updated.
/// </summary>
[JsonProperty(PropertyName = "workingDir")]
public string WorkingDir { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (Env != null)
{
foreach (var element in Env)
{
if (element != null)
{
element.Validate();
}
}
}
if (Lifecycle != null)
{
Lifecycle.Validate();
}
if (LivenessProbe != null)
{
LivenessProbe.Validate();
}
if (Ports != null)
{
foreach (var element1 in Ports)
{
if (element1 != null)
{
element1.Validate();
}
}
}
if (ReadinessProbe != null)
{
ReadinessProbe.Validate();
}
if (VolumeMounts != null)
{
foreach (var element2 in VolumeMounts)
{
if (element2 != null)
{
element2.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,73 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Describe a container image
/// </summary>
public partial class V1ContainerImage
{
/// <summary>
/// Initializes a new instance of the V1ContainerImage class.
/// </summary>
public V1ContainerImage()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ContainerImage class.
/// </summary>
/// <param name="names">Names by which this image is known. e.g.
/// ["gcr.io/google_containers/hyperkube:v1.0.7",
/// "dockerhub.io/google_containers/hyperkube:v1.0.7"]</param>
/// <param name="sizeBytes">The size of the image in bytes.</param>
public V1ContainerImage(IList<string> names, long? sizeBytes = default(long?))
{
Names = names;
SizeBytes = sizeBytes;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets names by which this image is known. e.g.
/// ["gcr.io/google_containers/hyperkube:v1.0.7",
/// "dockerhub.io/google_containers/hyperkube:v1.0.7"]
/// </summary>
[JsonProperty(PropertyName = "names")]
public IList<string> Names { get; set; }
/// <summary>
/// Gets or sets the size of the image in bytes.
/// </summary>
[JsonProperty(PropertyName = "sizeBytes")]
public long? SizeBytes { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Names == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Names");
}
}
}
}

View File

@@ -0,0 +1,104 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ContainerPort represents a network port in a single container.
/// </summary>
public partial class V1ContainerPort
{
/// <summary>
/// Initializes a new instance of the V1ContainerPort class.
/// </summary>
public V1ContainerPort()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ContainerPort class.
/// </summary>
/// <param name="containerPort">Number of port to expose on the pod's
/// IP address. This must be a valid port number, 0 &lt; x &lt;
/// 65536.</param>
/// <param name="hostIP">What host IP to bind the external port
/// to.</param>
/// <param name="hostPort">Number of port to expose on the host. If
/// specified, this must be a valid port number, 0 &lt; x &lt; 65536.
/// If HostNetwork is specified, this must match ContainerPort. Most
/// containers do not need this.</param>
/// <param name="name">If specified, this must be an IANA_SVC_NAME and
/// unique within the pod. Each named port in a pod must have a unique
/// name. Name for the port that can be referred to by
/// services.</param>
/// <param name="protocol">Protocol for port. Must be UDP or TCP.
/// Defaults to "TCP".</param>
public V1ContainerPort(int containerPort, string hostIP = default(string), int? hostPort = default(int?), string name = default(string), string protocol = default(string))
{
ContainerPort = containerPort;
HostIP = hostIP;
HostPort = hostPort;
Name = name;
Protocol = protocol;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets number of port to expose on the pod's IP address. This
/// must be a valid port number, 0 &amp;lt; x &amp;lt; 65536.
/// </summary>
[JsonProperty(PropertyName = "containerPort")]
public int ContainerPort { get; set; }
/// <summary>
/// Gets or sets what host IP to bind the external port to.
/// </summary>
[JsonProperty(PropertyName = "hostIP")]
public string HostIP { get; set; }
/// <summary>
/// Gets or sets number of port to expose on the host. If specified,
/// this must be a valid port number, 0 &amp;lt; x &amp;lt; 65536. If
/// HostNetwork is specified, this must match ContainerPort. Most
/// containers do not need this.
/// </summary>
[JsonProperty(PropertyName = "hostPort")]
public int? HostPort { get; set; }
/// <summary>
/// Gets or sets if specified, this must be an IANA_SVC_NAME and unique
/// within the pod. Each named port in a pod must have a unique name.
/// Name for the port that can be referred to by services.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets protocol for port. Must be UDP or TCP. Defaults to
/// "TCP".
/// </summary>
[JsonProperty(PropertyName = "protocol")]
public string Protocol { 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,77 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ContainerState holds a possible state of container. Only one of its
/// members may be specified. If none of them is specified, the default one
/// is ContainerStateWaiting.
/// </summary>
public partial class V1ContainerState
{
/// <summary>
/// Initializes a new instance of the V1ContainerState class.
/// </summary>
public V1ContainerState()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ContainerState class.
/// </summary>
/// <param name="running">Details about a running container</param>
/// <param name="terminated">Details about a terminated
/// container</param>
/// <param name="waiting">Details about a waiting container</param>
public V1ContainerState(V1ContainerStateRunning running = default(V1ContainerStateRunning), V1ContainerStateTerminated terminated = default(V1ContainerStateTerminated), V1ContainerStateWaiting waiting = default(V1ContainerStateWaiting))
{
Running = running;
Terminated = terminated;
Waiting = waiting;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets details about a running container
/// </summary>
[JsonProperty(PropertyName = "running")]
public V1ContainerStateRunning Running { get; set; }
/// <summary>
/// Gets or sets details about a terminated container
/// </summary>
[JsonProperty(PropertyName = "terminated")]
public V1ContainerStateTerminated Terminated { get; set; }
/// <summary>
/// Gets or sets details about a waiting container
/// </summary>
[JsonProperty(PropertyName = "waiting")]
public V1ContainerStateWaiting Waiting { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Terminated != null)
{
Terminated.Validate();
}
}
}
}

View File

@@ -0,0 +1,46 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ContainerStateRunning is a running state of a container.
/// </summary>
public partial class V1ContainerStateRunning
{
/// <summary>
/// Initializes a new instance of the V1ContainerStateRunning class.
/// </summary>
public V1ContainerStateRunning()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ContainerStateRunning class.
/// </summary>
/// <param name="startedAt">Time at which the container was last
/// (re-)started</param>
public V1ContainerStateRunning(System.DateTime? startedAt = default(System.DateTime?))
{
StartedAt = startedAt;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets time at which the container was last (re-)started
/// </summary>
[JsonProperty(PropertyName = "startedAt")]
public System.DateTime? StartedAt { get; set; }
}
}

View File

@@ -0,0 +1,114 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ContainerStateTerminated is a terminated state of a container.
/// </summary>
public partial class V1ContainerStateTerminated
{
/// <summary>
/// Initializes a new instance of the V1ContainerStateTerminated class.
/// </summary>
public V1ContainerStateTerminated()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ContainerStateTerminated class.
/// </summary>
/// <param name="exitCode">Exit status from the last termination of the
/// container</param>
/// <param name="containerID">Container's ID in the format
/// 'docker://&lt;container_id&gt;'</param>
/// <param name="finishedAt">Time at which the container last
/// terminated</param>
/// <param name="message">Message regarding the last termination of the
/// container</param>
/// <param name="reason">(brief) reason from the last termination of
/// the container</param>
/// <param name="signal">Signal from the last termination of the
/// container</param>
/// <param name="startedAt">Time at which previous execution of the
/// container started</param>
public V1ContainerStateTerminated(int exitCode, string containerID = default(string), System.DateTime? finishedAt = default(System.DateTime?), string message = default(string), string reason = default(string), int? signal = default(int?), System.DateTime? startedAt = default(System.DateTime?))
{
ContainerID = containerID;
ExitCode = exitCode;
FinishedAt = finishedAt;
Message = message;
Reason = reason;
Signal = signal;
StartedAt = startedAt;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets container's ID in the format
/// 'docker://&amp;lt;container_id&amp;gt;'
/// </summary>
[JsonProperty(PropertyName = "containerID")]
public string ContainerID { get; set; }
/// <summary>
/// Gets or sets exit status from the last termination of the container
/// </summary>
[JsonProperty(PropertyName = "exitCode")]
public int ExitCode { get; set; }
/// <summary>
/// Gets or sets time at which the container last terminated
/// </summary>
[JsonProperty(PropertyName = "finishedAt")]
public System.DateTime? FinishedAt { get; set; }
/// <summary>
/// Gets or sets message regarding the last termination of the
/// container
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets (brief) reason from the last termination of the
/// container
/// </summary>
[JsonProperty(PropertyName = "reason")]
public string Reason { get; set; }
/// <summary>
/// Gets or sets signal from the last termination of the container
/// </summary>
[JsonProperty(PropertyName = "signal")]
public int? Signal { get; set; }
/// <summary>
/// Gets or sets time at which previous execution of the container
/// started
/// </summary>
[JsonProperty(PropertyName = "startedAt")]
public System.DateTime? StartedAt { 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,56 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ContainerStateWaiting is a waiting state of a container.
/// </summary>
public partial class V1ContainerStateWaiting
{
/// <summary>
/// Initializes a new instance of the V1ContainerStateWaiting class.
/// </summary>
public V1ContainerStateWaiting()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ContainerStateWaiting class.
/// </summary>
/// <param name="message">Message regarding why the container is not
/// yet running.</param>
/// <param name="reason">(brief) reason the container is not yet
/// running.</param>
public V1ContainerStateWaiting(string message = default(string), string reason = default(string))
{
Message = message;
Reason = reason;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets message regarding why the container is not yet
/// running.
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets (brief) reason the container is not yet running.
/// </summary>
[JsonProperty(PropertyName = "reason")]
public string Reason { get; set; }
}
}

View File

@@ -0,0 +1,153 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// ContainerStatus contains details for the current status of this
/// container.
/// </summary>
public partial class V1ContainerStatus
{
/// <summary>
/// Initializes a new instance of the V1ContainerStatus class.
/// </summary>
public V1ContainerStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ContainerStatus class.
/// </summary>
/// <param name="image">The image the container is running. More info:
/// http://kubernetes.io/docs/user-guide/images</param>
/// <param name="imageID">ImageID of the container's image.</param>
/// <param name="name">This must be a DNS_LABEL. Each container in a
/// pod must have a unique name. Cannot be updated.</param>
/// <param name="ready">Specifies whether the container has passed its
/// readiness probe.</param>
/// <param name="restartCount">The number of times the container has
/// been restarted, currently based on the number of dead containers
/// that have not yet been removed. Note that this is calculated from
/// dead containers. But those containers are subject to garbage
/// collection. This value will get capped at 5 by GC.</param>
/// <param name="containerID">Container's ID in the format
/// 'docker://&lt;container_id&gt;'. More info:
/// http://kubernetes.io/docs/user-guide/container-environment#container-information</param>
/// <param name="lastState">Details about the container's last
/// termination condition.</param>
/// <param name="state">Details about the container's current
/// condition.</param>
public V1ContainerStatus(string image, string imageID, string name, bool ready, int restartCount, string containerID = default(string), V1ContainerState lastState = default(V1ContainerState), V1ContainerState state = default(V1ContainerState))
{
ContainerID = containerID;
Image = image;
ImageID = imageID;
LastState = lastState;
Name = name;
Ready = ready;
RestartCount = restartCount;
State = state;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets container's ID in the format
/// 'docker://&amp;lt;container_id&amp;gt;'. More info:
/// http://kubernetes.io/docs/user-guide/container-environment#container-information
/// </summary>
[JsonProperty(PropertyName = "containerID")]
public string ContainerID { get; set; }
/// <summary>
/// Gets or sets the image the container is running. More info:
/// http://kubernetes.io/docs/user-guide/images
/// </summary>
[JsonProperty(PropertyName = "image")]
public string Image { get; set; }
/// <summary>
/// Gets or sets imageID of the container's image.
/// </summary>
[JsonProperty(PropertyName = "imageID")]
public string ImageID { get; set; }
/// <summary>
/// Gets or sets details about the container's last termination
/// condition.
/// </summary>
[JsonProperty(PropertyName = "lastState")]
public V1ContainerState LastState { get; set; }
/// <summary>
/// Gets or sets this must be a DNS_LABEL. Each container in a pod must
/// have a unique name. Cannot be updated.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets specifies whether the container has passed its
/// readiness probe.
/// </summary>
[JsonProperty(PropertyName = "ready")]
public bool Ready { get; set; }
/// <summary>
/// Gets or sets the number of times the container has been restarted,
/// currently based on the number of dead containers that have not yet
/// been removed. Note that this is calculated from dead containers.
/// But those containers are subject to garbage collection. This value
/// will get capped at 5 by GC.
/// </summary>
[JsonProperty(PropertyName = "restartCount")]
public int RestartCount { get; set; }
/// <summary>
/// Gets or sets details about the container's current condition.
/// </summary>
[JsonProperty(PropertyName = "state")]
public V1ContainerState State { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Image == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Image");
}
if (ImageID == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ImageID");
}
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (LastState != null)
{
LastState.Validate();
}
if (State != null)
{
State.Validate();
}
}
}
}

View File

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

View File

@@ -0,0 +1,55 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// DaemonEndpoint contains information about a single Daemon endpoint.
/// </summary>
public partial class V1DaemonEndpoint
{
/// <summary>
/// Initializes a new instance of the V1DaemonEndpoint class.
/// </summary>
public V1DaemonEndpoint()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1DaemonEndpoint class.
/// </summary>
/// <param name="port">Port number of the given endpoint.</param>
public V1DaemonEndpoint(int port)
{
Port = port;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets port number of the given endpoint.
/// </summary>
[JsonProperty(PropertyName = "Port")]
public int Port { 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,129 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// DeleteOptions may be provided when deleting an API object.
/// </summary>
public partial class V1DeleteOptions
{
/// <summary>
/// Initializes a new instance of the V1DeleteOptions class.
/// </summary>
public V1DeleteOptions()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1DeleteOptions 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources</param>
/// <param name="gracePeriodSeconds">The duration in seconds before the
/// object should be deleted. Value must be non-negative integer. The
/// value zero indicates delete immediately. If this value is nil, the
/// default grace period for the specified type will be used. Defaults
/// to a per object value if not specified. zero means delete
/// immediately.</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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="orphanDependents">Deprecated: please use the
/// PropagationPolicy, this field will be deprecated in 1.7. Should the
/// dependent objects be orphaned. If true/false, the "orphan"
/// finalizer will be added to/removed from the object's finalizers
/// list. Either this field or PropagationPolicy may be set, but not
/// both.</param>
/// <param name="preconditions">Must be fulfilled before a deletion is
/// carried out. If not possible, a 409 Conflict status will be
/// returned.</param>
/// <param name="propagationPolicy">Whether and how garbage collection
/// will be performed. Either this field or OrphanDependents may be
/// set, but not both. The default policy is decided by the existing
/// finalizer set in the metadata.finalizers and the resource-specific
/// default policy.</param>
public V1DeleteOptions(string apiVersion = default(string), long? gracePeriodSeconds = default(long?), string kind = default(string), bool? orphanDependents = default(bool?), V1Preconditions preconditions = default(V1Preconditions), string propagationPolicy = default(string))
{
ApiVersion = apiVersion;
GracePeriodSeconds = gracePeriodSeconds;
Kind = kind;
OrphanDependents = orphanDependents;
Preconditions = preconditions;
PropagationPolicy = propagationPolicy;
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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets the duration in seconds before the object should be
/// deleted. Value must be non-negative integer. The value zero
/// indicates delete immediately. If this value is nil, the default
/// grace period for the specified type will be used. Defaults to a per
/// object value if not specified. zero means delete immediately.
/// </summary>
[JsonProperty(PropertyName = "gracePeriodSeconds")]
public long? GracePeriodSeconds { 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets deprecated: please use the PropagationPolicy, this
/// field will be deprecated in 1.7. Should the dependent objects be
/// orphaned. If true/false, the "orphan" finalizer will be added
/// to/removed from the object's finalizers list. Either this field or
/// PropagationPolicy may be set, but not both.
/// </summary>
[JsonProperty(PropertyName = "orphanDependents")]
public bool? OrphanDependents { get; set; }
/// <summary>
/// Gets or sets must be fulfilled before a deletion is carried out. If
/// not possible, a 409 Conflict status will be returned.
/// </summary>
[JsonProperty(PropertyName = "preconditions")]
public V1Preconditions Preconditions { get; set; }
/// <summary>
/// Gets or sets whether and how garbage collection will be performed.
/// Either this field or OrphanDependents may be set, but not both. The
/// default policy is decided by the existing finalizer set in the
/// metadata.finalizers and the resource-specific default policy.
/// </summary>
[JsonProperty(PropertyName = "propagationPolicy")]
public string PropagationPolicy { get; set; }
}
}

View File

@@ -0,0 +1,50 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Represents downward API info for projecting into a projected volume.
/// Note that this is identical to a downwardAPI volume source without the
/// default mode.
/// </summary>
public partial class V1DownwardAPIProjection
{
/// <summary>
/// Initializes a new instance of the V1DownwardAPIProjection class.
/// </summary>
public V1DownwardAPIProjection()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1DownwardAPIProjection class.
/// </summary>
/// <param name="items">Items is a list of DownwardAPIVolume
/// file</param>
public V1DownwardAPIProjection(IList<V1DownwardAPIVolumeFile> items = default(IList<V1DownwardAPIVolumeFile>))
{
Items = items;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets items is a list of DownwardAPIVolume file
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1DownwardAPIVolumeFile> Items { get; set; }
}
}

View File

@@ -0,0 +1,112 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// DownwardAPIVolumeFile represents information to create the file
/// containing the pod field
/// </summary>
public partial class V1DownwardAPIVolumeFile
{
/// <summary>
/// Initializes a new instance of the V1DownwardAPIVolumeFile class.
/// </summary>
public V1DownwardAPIVolumeFile()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1DownwardAPIVolumeFile class.
/// </summary>
/// <param name="path">Required: Path is the relative path name of the
/// file to be created. Must not be absolute or contain the '..' path.
/// Must be utf-8 encoded. The first item of the relative path must not
/// start with '..'</param>
/// <param name="fieldRef">Required: Selects a field of the pod: only
/// annotations, labels, name and namespace are supported.</param>
/// <param name="mode">Optional: mode bits to use on this file, must be
/// a value between 0 and 0777. If not specified, the volume
/// defaultMode will be used. This might be in conflict with other
/// options that affect the file mode, like fsGroup, and the result can
/// be other mode bits set.</param>
/// <param name="resourceFieldRef">Selects a resource of the container:
/// only resources limits and requests (limits.cpu, limits.memory,
/// requests.cpu and requests.memory) are currently supported.</param>
public V1DownwardAPIVolumeFile(string path, V1ObjectFieldSelector fieldRef = default(V1ObjectFieldSelector), int? mode = default(int?), V1ResourceFieldSelector resourceFieldRef = default(V1ResourceFieldSelector))
{
FieldRef = fieldRef;
Mode = mode;
Path = path;
ResourceFieldRef = resourceFieldRef;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets required: Selects a field of the pod: only
/// annotations, labels, name and namespace are supported.
/// </summary>
[JsonProperty(PropertyName = "fieldRef")]
public V1ObjectFieldSelector FieldRef { get; set; }
/// <summary>
/// Gets or sets optional: mode bits to use on this file, must be a
/// value between 0 and 0777. If not specified, the volume defaultMode
/// will be used. This might be in conflict with other options that
/// affect the file mode, like fsGroup, and the result can be other
/// mode bits set.
/// </summary>
[JsonProperty(PropertyName = "mode")]
public int? Mode { get; set; }
/// <summary>
/// Gets or sets required: Path is the relative path name of the file
/// to be created. Must not be absolute or contain the '..' path. Must
/// be utf-8 encoded. The first item of the relative path must not
/// start with '..'
/// </summary>
[JsonProperty(PropertyName = "path")]
public string Path { get; set; }
/// <summary>
/// Gets or sets selects a resource of the container: only resources
/// limits and requests (limits.cpu, limits.memory, requests.cpu and
/// requests.memory) are currently supported.
/// </summary>
[JsonProperty(PropertyName = "resourceFieldRef")]
public V1ResourceFieldSelector ResourceFieldRef { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Path == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Path");
}
if (FieldRef != null)
{
FieldRef.Validate();
}
if (ResourceFieldRef != null)
{
ResourceFieldRef.Validate();
}
}
}
}

View File

@@ -0,0 +1,67 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// DownwardAPIVolumeSource represents a volume containing downward API
/// info. Downward API volumes support ownership management and SELinux
/// relabeling.
/// </summary>
public partial class V1DownwardAPIVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1DownwardAPIVolumeSource class.
/// </summary>
public V1DownwardAPIVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1DownwardAPIVolumeSource class.
/// </summary>
/// <param name="defaultMode">Optional: mode bits to use on created
/// files by default. Must be a value between 0 and 0777. Defaults to
/// 0644. Directories within the path are not affected by this setting.
/// This might be in conflict with other options that affect the file
/// mode, like fsGroup, and the result can be other mode bits
/// set.</param>
/// <param name="items">Items is a list of downward API volume
/// file</param>
public V1DownwardAPIVolumeSource(int? defaultMode = default(int?), IList<V1DownwardAPIVolumeFile> items = default(IList<V1DownwardAPIVolumeFile>))
{
DefaultMode = defaultMode;
Items = items;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets optional: mode bits to use on created files by
/// default. Must be a value between 0 and 0777. Defaults to 0644.
/// Directories within the path are not affected by this setting. This
/// might be in conflict with other options that affect the file mode,
/// like fsGroup, and the result can be other mode bits set.
/// </summary>
[JsonProperty(PropertyName = "defaultMode")]
public int? DefaultMode { get; set; }
/// <summary>
/// Gets or sets items is a list of downward API volume file
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1DownwardAPIVolumeFile> Items { get; set; }
}
}

View File

@@ -0,0 +1,52 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Represents an empty directory for a pod. Empty directory volumes
/// support ownership management and SELinux relabeling.
/// </summary>
public partial class V1EmptyDirVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1EmptyDirVolumeSource class.
/// </summary>
public V1EmptyDirVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EmptyDirVolumeSource class.
/// </summary>
/// <param name="medium">What type of storage medium should back this
/// directory. The default is "" which means to use the node's default
/// medium. Must be an empty string (default) or Memory. More info:
/// http://kubernetes.io/docs/user-guide/volumes#emptydir</param>
public V1EmptyDirVolumeSource(string medium = default(string))
{
Medium = medium;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets what type of storage medium should back this
/// directory. The default is "" which means to use the node's default
/// medium. Must be an empty string (default) or Memory. More info:
/// http://kubernetes.io/docs/user-guide/volumes#emptydir
/// </summary>
[JsonProperty(PropertyName = "medium")]
public string Medium { get; set; }
}
}

View File

@@ -0,0 +1,94 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// EndpointAddress is a tuple that describes single IP address.
/// </summary>
public partial class V1EndpointAddress
{
/// <summary>
/// Initializes a new instance of the V1EndpointAddress class.
/// </summary>
public V1EndpointAddress()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EndpointAddress class.
/// </summary>
/// <param name="ip">The IP of this endpoint. May not be loopback
/// (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast
/// ((224.0.0.0/24). IPv6 is also accepted but not fully supported on
/// all platforms. Also, certain kubernetes components, like
/// kube-proxy, are not IPv6 ready.</param>
/// <param name="hostname">The Hostname of this endpoint</param>
/// <param name="nodeName">Optional: Node hosting this endpoint. This
/// can be used to determine endpoints local to a node.</param>
/// <param name="targetRef">Reference to object providing the
/// endpoint.</param>
public V1EndpointAddress(string ip, string hostname = default(string), string nodeName = default(string), V1ObjectReference targetRef = default(V1ObjectReference))
{
Hostname = hostname;
Ip = ip;
NodeName = nodeName;
TargetRef = targetRef;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the Hostname of this endpoint
/// </summary>
[JsonProperty(PropertyName = "hostname")]
public string Hostname { get; set; }
/// <summary>
/// Gets or sets the IP of this endpoint. May not be loopback
/// (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast
/// ((224.0.0.0/24). IPv6 is also accepted but not fully supported on
/// all platforms. Also, certain kubernetes components, like
/// kube-proxy, are not IPv6 ready.
/// </summary>
[JsonProperty(PropertyName = "ip")]
public string Ip { get; set; }
/// <summary>
/// Gets or sets optional: Node hosting this endpoint. This can be used
/// to determine endpoints local to a node.
/// </summary>
[JsonProperty(PropertyName = "nodeName")]
public string NodeName { get; set; }
/// <summary>
/// Gets or sets reference to object providing the endpoint.
/// </summary>
[JsonProperty(PropertyName = "targetRef")]
public V1ObjectReference TargetRef { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Ip == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Ip");
}
}
}
}

View File

@@ -0,0 +1,77 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// EndpointPort is a tuple that describes a single port.
/// </summary>
public partial class V1EndpointPort
{
/// <summary>
/// Initializes a new instance of the V1EndpointPort class.
/// </summary>
public V1EndpointPort()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EndpointPort class.
/// </summary>
/// <param name="port">The port number of the endpoint.</param>
/// <param name="name">The name of this port (corresponds to
/// ServicePort.Name). Must be a DNS_LABEL. Optional only if one port
/// is defined.</param>
/// <param name="protocol">The IP protocol for this port. Must be UDP
/// or TCP. Default is TCP.</param>
public V1EndpointPort(int port, string name = default(string), string protocol = default(string))
{
Name = name;
Port = port;
Protocol = protocol;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the name of this port (corresponds to
/// ServicePort.Name). Must be a DNS_LABEL. Optional only if one port
/// is defined.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets the port number of the endpoint.
/// </summary>
[JsonProperty(PropertyName = "port")]
public int Port { get; set; }
/// <summary>
/// Gets or sets the IP protocol for this port. Must be UDP or TCP.
/// Default is TCP.
/// </summary>
[JsonProperty(PropertyName = "protocol")]
public string Protocol { 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,83 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// EndpointSubset is a group of addresses with a common set of ports. The
/// expanded set of endpoints is the Cartesian product of Addresses x
/// Ports. For example, given:
/// {
/// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
/// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
/// }
/// The resulting set of endpoints can be viewed as:
/// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
/// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
/// </summary>
public partial class V1EndpointSubset
{
/// <summary>
/// Initializes a new instance of the V1EndpointSubset class.
/// </summary>
public V1EndpointSubset()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EndpointSubset class.
/// </summary>
/// <param name="addresses">IP addresses which offer the related ports
/// that are marked as ready. These endpoints should be considered safe
/// for load balancers and clients to utilize.</param>
/// <param name="notReadyAddresses">IP addresses which offer the
/// related ports but are not currently marked as ready because they
/// have not yet finished starting, have recently failed a readiness
/// check, or have recently failed a liveness check.</param>
/// <param name="ports">Port numbers available on the related IP
/// addresses.</param>
public V1EndpointSubset(IList<V1EndpointAddress> addresses = default(IList<V1EndpointAddress>), IList<V1EndpointAddress> notReadyAddresses = default(IList<V1EndpointAddress>), IList<V1EndpointPort> ports = default(IList<V1EndpointPort>))
{
Addresses = addresses;
NotReadyAddresses = notReadyAddresses;
Ports = ports;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets IP addresses which offer the related ports that are
/// marked as ready. These endpoints should be considered safe for load
/// balancers and clients to utilize.
/// </summary>
[JsonProperty(PropertyName = "addresses")]
public IList<V1EndpointAddress> Addresses { get; set; }
/// <summary>
/// Gets or sets IP addresses which offer the related ports but are not
/// currently marked as ready because they have not yet finished
/// starting, have recently failed a readiness check, or have recently
/// failed a liveness check.
/// </summary>
[JsonProperty(PropertyName = "notReadyAddresses")]
public IList<V1EndpointAddress> NotReadyAddresses { get; set; }
/// <summary>
/// Gets or sets port numbers available on the related IP addresses.
/// </summary>
[JsonProperty(PropertyName = "ports")]
public IList<V1EndpointPort> Ports { get; set; }
}
}

View File

@@ -0,0 +1,129 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Endpoints is a collection of endpoints that implement the actual
/// service. Example:
/// Name: "mysvc",
/// Subsets: [
/// {
/// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
/// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
/// },
/// {
/// Addresses: [{"ip": "10.10.3.3"}],
/// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
/// },
/// ]
/// </summary>
public partial class V1Endpoints
{
/// <summary>
/// Initializes a new instance of the V1Endpoints class.
/// </summary>
public V1Endpoints()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1Endpoints class.
/// </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
/// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</param>
public V1Endpoints(IList<V1EndpointSubset> subsets, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta))
{
ApiVersion = apiVersion;
Kind = kind;
Metadata = metadata;
Subsets = subsets;
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets 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.
/// </summary>
[JsonProperty(PropertyName = "subsets")]
public IList<V1EndpointSubset> Subsets { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Subsets == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Subsets");
}
}
}
}

View File

@@ -0,0 +1,113 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// EndpointsList is a list of endpoints.
/// </summary>
public partial class V1EndpointsList
{
/// <summary>
/// Initializes a new instance of the V1EndpointsList class.
/// </summary>
public V1EndpointsList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EndpointsList class.
/// </summary>
/// <param name="items">List of endpoints.</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard list metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
public V1EndpointsList(IList<V1Endpoints> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets list of endpoints.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1Endpoints> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard list metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </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,63 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// EnvFromSource represents the source of a set of ConfigMaps
/// </summary>
public partial class V1EnvFromSource
{
/// <summary>
/// Initializes a new instance of the V1EnvFromSource class.
/// </summary>
public V1EnvFromSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EnvFromSource class.
/// </summary>
/// <param name="configMapRef">The ConfigMap to select from</param>
/// <param name="prefix">An optional identifer to prepend to each key
/// in the ConfigMap. Must be a C_IDENTIFIER.</param>
/// <param name="secretRef">The Secret to select from</param>
public V1EnvFromSource(V1ConfigMapEnvSource configMapRef = default(V1ConfigMapEnvSource), string prefix = default(string), V1SecretEnvSource secretRef = default(V1SecretEnvSource))
{
ConfigMapRef = configMapRef;
Prefix = prefix;
SecretRef = secretRef;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the ConfigMap to select from
/// </summary>
[JsonProperty(PropertyName = "configMapRef")]
public V1ConfigMapEnvSource ConfigMapRef { get; set; }
/// <summary>
/// Gets or sets an optional identifer to prepend to each key in the
/// ConfigMap. Must be a C_IDENTIFIER.
/// </summary>
[JsonProperty(PropertyName = "prefix")]
public string Prefix { get; set; }
/// <summary>
/// Gets or sets the Secret to select from
/// </summary>
[JsonProperty(PropertyName = "secretRef")]
public V1SecretEnvSource SecretRef { get; set; }
}
}

View File

@@ -0,0 +1,95 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// EnvVar represents an environment variable present in a Container.
/// </summary>
public partial class V1EnvVar
{
/// <summary>
/// Initializes a new instance of the V1EnvVar class.
/// </summary>
public V1EnvVar()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EnvVar class.
/// </summary>
/// <param name="name">Name of the environment variable. Must be a
/// C_IDENTIFIER.</param>
/// <param name="value">Variable references $(VAR_NAME) are expanded
/// using the previous defined environment variables in the container
/// and any service environment variables. If a variable cannot be
/// resolved, the reference in the input string will be unchanged. The
/// $(VAR_NAME) syntax can be escaped with a double $$, ie:
/// $$(VAR_NAME). Escaped references will never be expanded, regardless
/// of whether the variable exists or not. Defaults to "".</param>
/// <param name="valueFrom">Source for the environment variable's
/// value. Cannot be used if value is not empty.</param>
public V1EnvVar(string name, string value = default(string), V1EnvVarSource valueFrom = default(V1EnvVarSource))
{
Name = name;
Value = value;
ValueFrom = valueFrom;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets name of the environment variable. Must be a
/// C_IDENTIFIER.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets variable references $(VAR_NAME) are expanded using the
/// previous defined environment variables in the container and any
/// service environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. The
/// $(VAR_NAME) syntax can be escaped with a double $$, ie:
/// $$(VAR_NAME). Escaped references will never be expanded, regardless
/// of whether the variable exists or not. Defaults to "".
/// </summary>
[JsonProperty(PropertyName = "value")]
public string Value { get; set; }
/// <summary>
/// Gets or sets source for the environment variable's value. Cannot be
/// used if value is not empty.
/// </summary>
[JsonProperty(PropertyName = "valueFrom")]
public V1EnvVarSource ValueFrom { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (ValueFrom != null)
{
ValueFrom.Validate();
}
}
}
}

View File

@@ -0,0 +1,104 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// EnvVarSource represents a source for the value of an EnvVar.
/// </summary>
public partial class V1EnvVarSource
{
/// <summary>
/// Initializes a new instance of the V1EnvVarSource class.
/// </summary>
public V1EnvVarSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EnvVarSource class.
/// </summary>
/// <param name="configMapKeyRef">Selects a key of a ConfigMap.</param>
/// <param name="fieldRef">Selects a field of the pod: supports
/// metadata.name, metadata.namespace, metadata.labels,
/// metadata.annotations, spec.nodeName, spec.serviceAccountName,
/// status.podIP.</param>
/// <param name="resourceFieldRef">Selects a resource of the container:
/// only resources limits and requests (limits.cpu, limits.memory,
/// requests.cpu and requests.memory) are currently supported.</param>
/// <param name="secretKeyRef">Selects a key of a secret in the pod's
/// namespace</param>
public V1EnvVarSource(V1ConfigMapKeySelector configMapKeyRef = default(V1ConfigMapKeySelector), V1ObjectFieldSelector fieldRef = default(V1ObjectFieldSelector), V1ResourceFieldSelector resourceFieldRef = default(V1ResourceFieldSelector), V1SecretKeySelector secretKeyRef = default(V1SecretKeySelector))
{
ConfigMapKeyRef = configMapKeyRef;
FieldRef = fieldRef;
ResourceFieldRef = resourceFieldRef;
SecretKeyRef = secretKeyRef;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets selects a key of a ConfigMap.
/// </summary>
[JsonProperty(PropertyName = "configMapKeyRef")]
public V1ConfigMapKeySelector ConfigMapKeyRef { get; set; }
/// <summary>
/// Gets or sets selects a field of the pod: supports metadata.name,
/// metadata.namespace, metadata.labels, metadata.annotations,
/// spec.nodeName, spec.serviceAccountName, status.podIP.
/// </summary>
[JsonProperty(PropertyName = "fieldRef")]
public V1ObjectFieldSelector FieldRef { get; set; }
/// <summary>
/// Gets or sets selects a resource of the container: only resources
/// limits and requests (limits.cpu, limits.memory, requests.cpu and
/// requests.memory) are currently supported.
/// </summary>
[JsonProperty(PropertyName = "resourceFieldRef")]
public V1ResourceFieldSelector ResourceFieldRef { get; set; }
/// <summary>
/// Gets or sets selects a key of a secret in the pod's namespace
/// </summary>
[JsonProperty(PropertyName = "secretKeyRef")]
public V1SecretKeySelector SecretKeyRef { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (ConfigMapKeyRef != null)
{
ConfigMapKeyRef.Validate();
}
if (FieldRef != null)
{
FieldRef.Validate();
}
if (ResourceFieldRef != null)
{
ResourceFieldRef.Validate();
}
if (SecretKeyRef != null)
{
SecretKeyRef.Validate();
}
}
}
}

177
src/generated/Models/V1Event.cs Executable file
View File

@@ -0,0 +1,177 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Event is a report of an event somewhere in the cluster.
/// </summary>
public partial class V1Event
{
/// <summary>
/// Initializes a new instance of the V1Event class.
/// </summary>
public V1Event()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1Event class.
/// </summary>
/// <param name="involvedObject">The object that this event is
/// about.</param>
/// <param name="metadata">Standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources</param>
/// <param name="count">The number of times this event has
/// occurred.</param>
/// <param name="firstTimestamp">The time at which the event was first
/// recorded. (Time of server receipt is in TypeMeta.)</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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="lastTimestamp">The time at which the most recent
/// occurrence of this event was recorded.</param>
/// <param name="message">A human-readable description of the status of
/// this operation.</param>
/// <param name="reason">This should be a short, machine understandable
/// string that gives the reason for the transition into the object's
/// current status.</param>
/// <param name="source">The component reporting this event. Should be
/// a short machine understandable string.</param>
/// <param name="type">Type of this event (Normal, Warning), new types
/// could be added in the future</param>
public V1Event(V1ObjectReference involvedObject, V1ObjectMeta metadata, string apiVersion = default(string), int? count = default(int?), System.DateTime? firstTimestamp = default(System.DateTime?), string kind = default(string), System.DateTime? lastTimestamp = default(System.DateTime?), string message = default(string), string reason = default(string), V1EventSource source = default(V1EventSource), string type = default(string))
{
ApiVersion = apiVersion;
Count = count;
FirstTimestamp = firstTimestamp;
InvolvedObject = involvedObject;
Kind = kind;
LastTimestamp = lastTimestamp;
Message = message;
Metadata = metadata;
Reason = reason;
Source = source;
Type = type;
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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets the number of times this event has occurred.
/// </summary>
[JsonProperty(PropertyName = "count")]
public int? Count { get; set; }
/// <summary>
/// Gets or sets the time at which the event was first recorded. (Time
/// of server receipt is in TypeMeta.)
/// </summary>
[JsonProperty(PropertyName = "firstTimestamp")]
public System.DateTime? FirstTimestamp { get; set; }
/// <summary>
/// Gets or sets the object that this event is about.
/// </summary>
[JsonProperty(PropertyName = "involvedObject")]
public V1ObjectReference InvolvedObject { 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets the time at which the most recent occurrence of this
/// event was recorded.
/// </summary>
[JsonProperty(PropertyName = "lastTimestamp")]
public System.DateTime? LastTimestamp { get; set; }
/// <summary>
/// Gets or sets a human-readable description of the status of this
/// operation.
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets this should be a short, machine understandable string
/// that gives the reason for the transition into the object's current
/// status.
/// </summary>
[JsonProperty(PropertyName = "reason")]
public string Reason { get; set; }
/// <summary>
/// Gets or sets the component reporting this event. Should be a short
/// machine understandable string.
/// </summary>
[JsonProperty(PropertyName = "source")]
public V1EventSource Source { get; set; }
/// <summary>
/// Gets or sets type of this event (Normal, Warning), new types could
/// be added in the future
/// </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 (InvolvedObject == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "InvolvedObject");
}
if (Metadata == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Metadata");
}
}
}
}

View File

@@ -0,0 +1,113 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// EventList is a list of events.
/// </summary>
public partial class V1EventList
{
/// <summary>
/// Initializes a new instance of the V1EventList class.
/// </summary>
public V1EventList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EventList class.
/// </summary>
/// <param name="items">List of events</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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard list metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
public V1EventList(IList<V1Event> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets list of events
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1Event> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard list metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </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,55 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// EventSource contains information for an event.
/// </summary>
public partial class V1EventSource
{
/// <summary>
/// Initializes a new instance of the V1EventSource class.
/// </summary>
public V1EventSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1EventSource class.
/// </summary>
/// <param name="component">Component from which the event is
/// generated.</param>
/// <param name="host">Node name on which the event is
/// generated.</param>
public V1EventSource(string component = default(string), string host = default(string))
{
Component = component;
Host = host;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets component from which the event is generated.
/// </summary>
[JsonProperty(PropertyName = "component")]
public string Component { get; set; }
/// <summary>
/// Gets or sets node name on which the event is generated.
/// </summary>
[JsonProperty(PropertyName = "host")]
public string Host { get; set; }
}
}

View File

@@ -0,0 +1,59 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// ExecAction describes a "run in container" action.
/// </summary>
public partial class V1ExecAction
{
/// <summary>
/// Initializes a new instance of the V1ExecAction class.
/// </summary>
public V1ExecAction()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ExecAction class.
/// </summary>
/// <param name="command">Command is the command line to execute inside
/// the container, the working directory for the command is root ('/')
/// in the container's filesystem. The command is simply exec'd, it is
/// not run inside a shell, so traditional shell instructions ('|',
/// etc) won't work. To use a shell, you need to explicitly call out to
/// that shell. Exit status of 0 is treated as live/healthy and
/// non-zero is unhealthy.</param>
public V1ExecAction(IList<string> command = default(IList<string>))
{
Command = command;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets command is the command line to execute inside the
/// container, the working directory for the command is root ('/') in
/// the container's filesystem. The command is simply exec'd, it is not
/// run inside a shell, so traditional shell instructions ('|', etc)
/// won't work. To use a shell, you need to explicitly call out to that
/// shell. Exit status of 0 is treated as live/healthy and non-zero is
/// unhealthy.
/// </summary>
[JsonProperty(PropertyName = "command")]
public IList<string> Command { get; set; }
}
}

View File

@@ -0,0 +1,95 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Represents a Fibre Channel volume. Fibre Channel volumes can only be
/// mounted as read/write once. Fibre Channel volumes support ownership
/// management and SELinux relabeling.
/// </summary>
public partial class V1FCVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1FCVolumeSource class.
/// </summary>
public V1FCVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1FCVolumeSource class.
/// </summary>
/// <param name="lun">Required: FC target lun number</param>
/// <param name="targetWWNs">Required: FC target worldwide names
/// (WWNs)</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="readOnlyProperty">Optional: Defaults to false
/// (read/write). ReadOnly here will force the ReadOnly setting in
/// VolumeMounts.</param>
public V1FCVolumeSource(int lun, IList<string> targetWWNs, string fsType = default(string), bool? readOnlyProperty = default(bool?))
{
FsType = fsType;
Lun = lun;
ReadOnlyProperty = readOnlyProperty;
TargetWWNs = targetWWNs;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <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 required: FC target lun number
/// </summary>
[JsonProperty(PropertyName = "lun")]
public int Lun { 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 required: FC target worldwide names (WWNs)
/// </summary>
[JsonProperty(PropertyName = "targetWWNs")]
public IList<string> TargetWWNs { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (TargetWWNs == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "TargetWWNs");
}
}
}
}

View File

@@ -0,0 +1,114 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// FlexVolume represents a generic volume resource that is
/// provisioned/attached using an exec based plugin. This is an alpha
/// feature and may change in future.
/// </summary>
public partial class V1FlexVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1FlexVolumeSource class.
/// </summary>
public V1FlexVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1FlexVolumeSource 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 V1FlexVolumeSource(string driver, string fsType = default(string), IDictionary<string, string> options = default(IDictionary<string, string>), bool? readOnlyProperty = default(bool?), V1LocalObjectReference secretRef = default(V1LocalObjectReference))
{
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 V1LocalObjectReference 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

@@ -0,0 +1,60 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Represents a Flocker volume mounted by the Flocker agent. One and only
/// one of datasetName and datasetUUID should be set. Flocker volumes do
/// not support ownership management or SELinux relabeling.
/// </summary>
public partial class V1FlockerVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1FlockerVolumeSource class.
/// </summary>
public V1FlockerVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1FlockerVolumeSource class.
/// </summary>
/// <param name="datasetName">Name of the dataset stored as metadata
/// -&gt; name on the dataset for Flocker should be considered as
/// deprecated</param>
/// <param name="datasetUUID">UUID of the dataset. This is unique
/// identifier of a Flocker dataset</param>
public V1FlockerVolumeSource(string datasetName = default(string), string datasetUUID = default(string))
{
DatasetName = datasetName;
DatasetUUID = datasetUUID;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets name of the dataset stored as metadata -&amp;gt; name
/// on the dataset for Flocker should be considered as deprecated
/// </summary>
[JsonProperty(PropertyName = "datasetName")]
public string DatasetName { get; set; }
/// <summary>
/// Gets or sets UUID of the dataset. This is unique identifier of a
/// Flocker dataset
/// </summary>
[JsonProperty(PropertyName = "datasetUUID")]
public string DatasetUUID { get; set; }
}
}

View File

@@ -0,0 +1,116 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Represents a Persistent Disk resource in Google Compute Engine.
///
/// A GCE PD must exist before mounting to a container. The disk must also
/// be in the same GCE project and zone as the kubelet. A GCE PD can only
/// be mounted as read/write once or read-only many times. GCE PDs support
/// ownership management and SELinux relabeling.
/// </summary>
public partial class V1GCEPersistentDiskVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1GCEPersistentDiskVolumeSource
/// class.
/// </summary>
public V1GCEPersistentDiskVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1GCEPersistentDiskVolumeSource
/// class.
/// </summary>
/// <param name="pdName">Unique name of the PD resource in GCE. Used to
/// identify the disk in GCE. More info:
/// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk</param>
/// <param name="fsType">Filesystem type of the volume that you want to
/// mount. Tip: Ensure that the filesystem type is supported by the
/// host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly
/// inferred to be "ext4" if unspecified. More info:
/// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk</param>
/// <param name="partition">The partition in the volume that you want
/// to mount. If omitted, the default is to mount by volume name.
/// Examples: For volume /dev/sda1, you specify the partition as "1".
/// Similarly, the volume partition for /dev/sda is "0" (or you can
/// leave the property empty). More info:
/// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk</param>
/// <param name="readOnlyProperty">ReadOnly here will force the
/// ReadOnly setting in VolumeMounts. Defaults to false. More info:
/// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk</param>
public V1GCEPersistentDiskVolumeSource(string pdName, string fsType = default(string), int? partition = default(int?), bool? readOnlyProperty = default(bool?))
{
FsType = fsType;
Partition = partition;
PdName = pdName;
ReadOnlyProperty = readOnlyProperty;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets filesystem type of the volume that you want to mount.
/// Tip: Ensure that the filesystem type is supported by the host
/// operating system. Examples: "ext4", "xfs", "ntfs". Implicitly
/// inferred to be "ext4" if unspecified. More info:
/// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk
/// </summary>
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }
/// <summary>
/// Gets or sets the partition in the volume that you want to mount. If
/// omitted, the default is to mount by volume name. Examples: For
/// volume /dev/sda1, you specify the partition as "1". Similarly, the
/// volume partition for /dev/sda is "0" (or you can leave the property
/// empty). More info:
/// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk
/// </summary>
[JsonProperty(PropertyName = "partition")]
public int? Partition { get; set; }
/// <summary>
/// Gets or sets unique name of the PD resource in GCE. Used to
/// identify the disk in GCE. More info:
/// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk
/// </summary>
[JsonProperty(PropertyName = "pdName")]
public string PdName { get; set; }
/// <summary>
/// Gets or sets readOnly here will force the ReadOnly setting in
/// VolumeMounts. Defaults to false. More info:
/// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk
/// </summary>
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (PdName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "PdName");
}
}
}
}

View File

@@ -0,0 +1,85 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Represents a volume that is populated with the contents of a git
/// repository. Git repo volumes do not support ownership management. Git
/// repo volumes support SELinux relabeling.
/// </summary>
public partial class V1GitRepoVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1GitRepoVolumeSource class.
/// </summary>
public V1GitRepoVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1GitRepoVolumeSource class.
/// </summary>
/// <param name="repository">Repository URL</param>
/// <param name="directory">Target directory name. Must not contain or
/// start with '..'. If '.' is supplied, the volume directory will be
/// the git repository. Otherwise, if specified, the volume will
/// contain the git repository in the subdirectory with the given
/// name.</param>
/// <param name="revision">Commit hash for the specified
/// revision.</param>
public V1GitRepoVolumeSource(string repository, string directory = default(string), string revision = default(string))
{
Directory = directory;
Repository = repository;
Revision = revision;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets target directory name. Must not contain or start with
/// '..'. If '.' is supplied, the volume directory will be the git
/// repository. Otherwise, if specified, the volume will contain the
/// git repository in the subdirectory with the given name.
/// </summary>
[JsonProperty(PropertyName = "directory")]
public string Directory { get; set; }
/// <summary>
/// Gets or sets repository URL
/// </summary>
[JsonProperty(PropertyName = "repository")]
public string Repository { get; set; }
/// <summary>
/// Gets or sets commit hash for the specified revision.
/// </summary>
[JsonProperty(PropertyName = "revision")]
public string Revision { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Repository == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Repository");
}
}
}
}

View File

@@ -0,0 +1,92 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Represents a Glusterfs mount that lasts the lifetime of a pod.
/// Glusterfs volumes do not support ownership management or SELinux
/// relabeling.
/// </summary>
public partial class V1GlusterfsVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1GlusterfsVolumeSource class.
/// </summary>
public V1GlusterfsVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1GlusterfsVolumeSource class.
/// </summary>
/// <param name="endpoints">EndpointsName is the endpoint name that
/// details Glusterfs topology. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod</param>
/// <param name="path">Path is the Glusterfs volume path. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod</param>
/// <param name="readOnlyProperty">ReadOnly here will force the
/// Glusterfs volume to be mounted with read-only permissions. Defaults
/// to false. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod</param>
public V1GlusterfsVolumeSource(string endpoints, string path, bool? readOnlyProperty = default(bool?))
{
Endpoints = endpoints;
Path = path;
ReadOnlyProperty = readOnlyProperty;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets endpointsName is the endpoint name that details
/// Glusterfs topology. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
/// </summary>
[JsonProperty(PropertyName = "endpoints")]
public string Endpoints { get; set; }
/// <summary>
/// Gets or sets path is the Glusterfs volume path. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
/// </summary>
[JsonProperty(PropertyName = "path")]
public string Path { get; set; }
/// <summary>
/// Gets or sets readOnly here will force the Glusterfs volume to be
/// mounted with read-only permissions. Defaults to false. More info:
/// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
/// </summary>
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Endpoints == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Endpoints");
}
if (Path == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Path");
}
}
}
}

View File

@@ -0,0 +1,78 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// GroupVersion contains the "group/version" and "version" string of a
/// version. It is made a struct to keep extensibility.
/// </summary>
public partial class V1GroupVersionForDiscovery
{
/// <summary>
/// Initializes a new instance of the V1GroupVersionForDiscovery class.
/// </summary>
public V1GroupVersionForDiscovery()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1GroupVersionForDiscovery class.
/// </summary>
/// <param name="groupVersion">groupVersion specifies the API group and
/// version in the form "group/version"</param>
/// <param name="version">version specifies the version in the form of
/// "version". This is to save the clients the trouble of splitting the
/// GroupVersion.</param>
public V1GroupVersionForDiscovery(string groupVersion, string version)
{
GroupVersion = groupVersion;
Version = version;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets groupVersion specifies the API group and version in
/// the form "group/version"
/// </summary>
[JsonProperty(PropertyName = "groupVersion")]
public string GroupVersion { get; set; }
/// <summary>
/// Gets or sets version specifies the version in the form of
/// "version". This is to save the clients the trouble of splitting the
/// GroupVersion.
/// </summary>
[JsonProperty(PropertyName = "version")]
public string Version { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (GroupVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "GroupVersion");
}
if (Version == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Version");
}
}
}
}

View File

@@ -0,0 +1,113 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// HTTPGetAction describes an action based on HTTP Get requests.
/// </summary>
public partial class V1HTTPGetAction
{
/// <summary>
/// Initializes a new instance of the V1HTTPGetAction class.
/// </summary>
public V1HTTPGetAction()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1HTTPGetAction class.
/// </summary>
/// <param name="port">Name or number of the port to access on the
/// container. Number must be in the range 1 to 65535. Name must be an
/// IANA_SVC_NAME.</param>
/// <param name="host">Host name to connect to, defaults to the pod IP.
/// You probably want to set "Host" in httpHeaders instead.</param>
/// <param name="httpHeaders">Custom headers to set in the request.
/// HTTP allows repeated headers.</param>
/// <param name="path">Path to access on the HTTP server.</param>
/// <param name="scheme">Scheme to use for connecting to the host.
/// Defaults to HTTP.</param>
public V1HTTPGetAction(string port, string host = default(string), IList<V1HTTPHeader> httpHeaders = default(IList<V1HTTPHeader>), string path = default(string), string scheme = default(string))
{
Host = host;
HttpHeaders = httpHeaders;
Path = path;
Port = port;
Scheme = scheme;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets host name to connect to, defaults to the pod IP. You
/// probably want to set "Host" in httpHeaders instead.
/// </summary>
[JsonProperty(PropertyName = "host")]
public string Host { get; set; }
/// <summary>
/// Gets or sets custom headers to set in the request. HTTP allows
/// repeated headers.
/// </summary>
[JsonProperty(PropertyName = "httpHeaders")]
public IList<V1HTTPHeader> HttpHeaders { get; set; }
/// <summary>
/// Gets or sets path to access on the HTTP server.
/// </summary>
[JsonProperty(PropertyName = "path")]
public string Path { get; set; }
/// <summary>
/// Gets or sets name or number of the port to access on the container.
/// Number must be in the range 1 to 65535. Name must be an
/// IANA_SVC_NAME.
/// </summary>
[JsonProperty(PropertyName = "port")]
public string Port { get; set; }
/// <summary>
/// Gets or sets scheme to use for connecting to the host. Defaults to
/// HTTP.
/// </summary>
[JsonProperty(PropertyName = "scheme")]
public string Scheme { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Port == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Port");
}
if (HttpHeaders != null)
{
foreach (var element in HttpHeaders)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,71 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// HTTPHeader describes a custom header to be used in HTTP probes
/// </summary>
public partial class V1HTTPHeader
{
/// <summary>
/// Initializes a new instance of the V1HTTPHeader class.
/// </summary>
public V1HTTPHeader()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1HTTPHeader class.
/// </summary>
/// <param name="name">The header field name</param>
/// <param name="value">The header field value</param>
public V1HTTPHeader(string name, string value)
{
Name = name;
Value = value;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the header field name
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets the header field value
/// </summary>
[JsonProperty(PropertyName = "value")]
public string Value { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (Value == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Value");
}
}
}
}

View File

@@ -0,0 +1,83 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Handler defines a specific action that should be taken
/// </summary>
public partial class V1Handler
{
/// <summary>
/// Initializes a new instance of the V1Handler class.
/// </summary>
public V1Handler()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1Handler class.
/// </summary>
/// <param name="exec">One and only one of the following should be
/// specified. Exec specifies the action to take.</param>
/// <param name="httpGet">HTTPGet specifies the http request to
/// perform.</param>
/// <param name="tcpSocket">TCPSocket specifies an action involving a
/// TCP port. TCP hooks not yet supported</param>
public V1Handler(V1ExecAction exec = default(V1ExecAction), V1HTTPGetAction httpGet = default(V1HTTPGetAction), V1TCPSocketAction tcpSocket = default(V1TCPSocketAction))
{
Exec = exec;
HttpGet = httpGet;
TcpSocket = tcpSocket;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets one and only one of the following should be specified.
/// Exec specifies the action to take.
/// </summary>
[JsonProperty(PropertyName = "exec")]
public V1ExecAction Exec { get; set; }
/// <summary>
/// Gets or sets hTTPGet specifies the http request to perform.
/// </summary>
[JsonProperty(PropertyName = "httpGet")]
public V1HTTPGetAction HttpGet { get; set; }
/// <summary>
/// Gets or sets tCPSocket specifies an action involving a TCP port.
/// TCP hooks not yet supported
/// </summary>
[JsonProperty(PropertyName = "tcpSocket")]
public V1TCPSocketAction TcpSocket { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (HttpGet != null)
{
HttpGet.Validate();
}
if (TcpSocket != null)
{
TcpSocket.Validate();
}
}
}
}

View File

@@ -0,0 +1,115 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// configuration of a horizontal pod autoscaler.
/// </summary>
public partial class V1HorizontalPodAutoscaler
{
/// <summary>
/// Initializes a new instance of the V1HorizontalPodAutoscaler class.
/// </summary>
public V1HorizontalPodAutoscaler()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1HorizontalPodAutoscaler 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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</param>
/// <param name="spec">behaviour of autoscaler. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.</param>
/// <param name="status">current information about the
/// autoscaler.</param>
public V1HorizontalPodAutoscaler(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1HorizontalPodAutoscalerSpec spec = default(V1HorizontalPodAutoscalerSpec), V1HorizontalPodAutoscalerStatus status = default(V1HorizontalPodAutoscalerStatus))
{
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard object metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets behaviour of autoscaler. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
/// </summary>
[JsonProperty(PropertyName = "spec")]
public V1HorizontalPodAutoscalerSpec Spec { get; set; }
/// <summary>
/// Gets or sets current information about the autoscaler.
/// </summary>
[JsonProperty(PropertyName = "status")]
public V1HorizontalPodAutoscalerStatus Status { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Spec != null)
{
Spec.Validate();
}
if (Status != null)
{
Status.Validate();
}
}
}
}

View File

@@ -0,0 +1,114 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// list of horizontal pod autoscaler objects.
/// </summary>
public partial class V1HorizontalPodAutoscalerList
{
/// <summary>
/// Initializes a new instance of the V1HorizontalPodAutoscalerList
/// class.
/// </summary>
public V1HorizontalPodAutoscalerList()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1HorizontalPodAutoscalerList
/// class.
/// </summary>
/// <param name="items">list of horizontal pod autoscaler
/// objects.</param>
/// <param name="apiVersion">APIVersion defines the versioned schema of
/// this representation of an object. Servers should convert recognized
/// schemas to the latest internal value, and may reject unrecognized
/// values. More info:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard list metadata.</param>
public V1HorizontalPodAutoscalerList(IList<V1HorizontalPodAutoscaler> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets list of horizontal pod autoscaler objects.
/// </summary>
[JsonProperty(PropertyName = "items")]
public IList<V1HorizontalPodAutoscaler> 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets standard list metadata.
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ListMeta Metadata { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Items == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Items");
}
if (Items != null)
{
foreach (var element in Items)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}

View File

@@ -0,0 +1,104 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// specification of a horizontal pod autoscaler.
/// </summary>
public partial class V1HorizontalPodAutoscalerSpec
{
/// <summary>
/// Initializes a new instance of the V1HorizontalPodAutoscalerSpec
/// class.
/// </summary>
public V1HorizontalPodAutoscalerSpec()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1HorizontalPodAutoscalerSpec
/// class.
/// </summary>
/// <param name="maxReplicas">upper limit for the number of pods that
/// can be set by the autoscaler; cannot be smaller than
/// MinReplicas.</param>
/// <param name="scaleTargetRef">reference to scaled resource;
/// horizontal pod autoscaler will learn the current resource
/// consumption and will set the desired number of pods by using its
/// Scale subresource.</param>
/// <param name="minReplicas">lower limit for the number of pods that
/// can be set by the autoscaler, default 1.</param>
/// <param name="targetCPUUtilizationPercentage">target average CPU
/// utilization (represented as a percentage of requested CPU) over all
/// the pods; if not specified the default autoscaling policy will be
/// used.</param>
public V1HorizontalPodAutoscalerSpec(int maxReplicas, V1CrossVersionObjectReference scaleTargetRef, int? minReplicas = default(int?), int? targetCPUUtilizationPercentage = default(int?))
{
MaxReplicas = maxReplicas;
MinReplicas = minReplicas;
ScaleTargetRef = scaleTargetRef;
TargetCPUUtilizationPercentage = targetCPUUtilizationPercentage;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets upper limit for the number of pods that can be set by
/// the autoscaler; cannot be smaller than MinReplicas.
/// </summary>
[JsonProperty(PropertyName = "maxReplicas")]
public int MaxReplicas { get; set; }
/// <summary>
/// Gets or sets lower limit for the number of pods that can be set by
/// the autoscaler, default 1.
/// </summary>
[JsonProperty(PropertyName = "minReplicas")]
public int? MinReplicas { get; set; }
/// <summary>
/// Gets or sets reference to scaled resource; horizontal pod
/// autoscaler will learn the current resource consumption and will set
/// the desired number of pods by using its Scale subresource.
/// </summary>
[JsonProperty(PropertyName = "scaleTargetRef")]
public V1CrossVersionObjectReference ScaleTargetRef { get; set; }
/// <summary>
/// Gets or sets target average CPU utilization (represented as a
/// percentage of requested CPU) over all the pods; if not specified
/// the default autoscaling policy will be used.
/// </summary>
[JsonProperty(PropertyName = "targetCPUUtilizationPercentage")]
public int? TargetCPUUtilizationPercentage { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (ScaleTargetRef == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ScaleTargetRef");
}
if (ScaleTargetRef != null)
{
ScaleTargetRef.Validate();
}
}
}
}

View File

@@ -0,0 +1,103 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// current status of a horizontal pod autoscaler
/// </summary>
public partial class V1HorizontalPodAutoscalerStatus
{
/// <summary>
/// Initializes a new instance of the V1HorizontalPodAutoscalerStatus
/// class.
/// </summary>
public V1HorizontalPodAutoscalerStatus()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1HorizontalPodAutoscalerStatus
/// class.
/// </summary>
/// <param name="currentReplicas">current number of replicas of pods
/// managed by this autoscaler.</param>
/// <param name="desiredReplicas">desired number of replicas of pods
/// managed by this autoscaler.</param>
/// <param name="currentCPUUtilizationPercentage">current average CPU
/// utilization over all pods, represented as a percentage of requested
/// CPU, e.g. 70 means that an average pod is using now 70% of its
/// requested CPU.</param>
/// <param name="lastScaleTime">last time the HorizontalPodAutoscaler
/// scaled the number of pods; used by the autoscaler to control how
/// often the number of pods is changed.</param>
/// <param name="observedGeneration">most recent generation observed by
/// this autoscaler.</param>
public V1HorizontalPodAutoscalerStatus(int currentReplicas, int desiredReplicas, int? currentCPUUtilizationPercentage = default(int?), System.DateTime? lastScaleTime = default(System.DateTime?), long? observedGeneration = default(long?))
{
CurrentCPUUtilizationPercentage = currentCPUUtilizationPercentage;
CurrentReplicas = currentReplicas;
DesiredReplicas = desiredReplicas;
LastScaleTime = lastScaleTime;
ObservedGeneration = observedGeneration;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets current average CPU utilization over all pods,
/// represented as a percentage of requested CPU, e.g. 70 means that an
/// average pod is using now 70% of its requested CPU.
/// </summary>
[JsonProperty(PropertyName = "currentCPUUtilizationPercentage")]
public int? CurrentCPUUtilizationPercentage { get; set; }
/// <summary>
/// Gets or sets current number of replicas of pods managed by this
/// autoscaler.
/// </summary>
[JsonProperty(PropertyName = "currentReplicas")]
public int CurrentReplicas { get; set; }
/// <summary>
/// Gets or sets desired number of replicas of pods managed by this
/// autoscaler.
/// </summary>
[JsonProperty(PropertyName = "desiredReplicas")]
public int DesiredReplicas { get; set; }
/// <summary>
/// Gets or sets last time the HorizontalPodAutoscaler scaled the
/// number of pods; used by the autoscaler to control how often the
/// number of pods is changed.
/// </summary>
[JsonProperty(PropertyName = "lastScaleTime")]
public System.DateTime? LastScaleTime { get; set; }
/// <summary>
/// Gets or sets most recent generation observed by this autoscaler.
/// </summary>
[JsonProperty(PropertyName = "observedGeneration")]
public long? ObservedGeneration { 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,62 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Represents a host path mapped into a pod. Host path volumes do not
/// support ownership management or SELinux relabeling.
/// </summary>
public partial class V1HostPathVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1HostPathVolumeSource class.
/// </summary>
public V1HostPathVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1HostPathVolumeSource class.
/// </summary>
/// <param name="path">Path of the directory on the host. More info:
/// http://kubernetes.io/docs/user-guide/volumes#hostpath</param>
public V1HostPathVolumeSource(string path)
{
Path = path;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets path of the directory on the host. More info:
/// http://kubernetes.io/docs/user-guide/volumes#hostpath
/// </summary>
[JsonProperty(PropertyName = "path")]
public string Path { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Path == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Path");
}
}
}
}

View File

@@ -0,0 +1,135 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Represents an ISCSI disk. ISCSI volumes can only be mounted as
/// read/write once. ISCSI volumes support ownership management and SELinux
/// relabeling.
/// </summary>
public partial class V1ISCSIVolumeSource
{
/// <summary>
/// Initializes a new instance of the V1ISCSIVolumeSource class.
/// </summary>
public V1ISCSIVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1ISCSIVolumeSource class.
/// </summary>
/// <param name="iqn">Target iSCSI Qualified Name.</param>
/// <param name="lun">iSCSI target lun number.</param>
/// <param name="targetPortal">iSCSI target portal. The portal is
/// either an IP or ip_addr:port if the port is other than default
/// (typically TCP ports 860 and 3260).</param>
/// <param name="fsType">Filesystem type of the volume that you want to
/// mount. Tip: Ensure that the filesystem type is supported by the
/// host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly
/// inferred to be "ext4" if unspecified. More info:
/// http://kubernetes.io/docs/user-guide/volumes#iscsi</param>
/// <param name="iscsiInterface">Optional: Defaults to 'default' (tcp).
/// iSCSI interface name that uses an iSCSI transport.</param>
/// <param name="portals">iSCSI target portal List. The portal is
/// either an IP or ip_addr:port if the port is other than default
/// (typically TCP ports 860 and 3260).</param>
/// <param name="readOnlyProperty">ReadOnly here will force the
/// ReadOnly setting in VolumeMounts. Defaults to false.</param>
public V1ISCSIVolumeSource(string iqn, int lun, string targetPortal, string fsType = default(string), string iscsiInterface = default(string), IList<string> portals = default(IList<string>), bool? readOnlyProperty = default(bool?))
{
FsType = fsType;
Iqn = iqn;
IscsiInterface = iscsiInterface;
Lun = lun;
Portals = portals;
ReadOnlyProperty = readOnlyProperty;
TargetPortal = targetPortal;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets filesystem type of the volume that you want to mount.
/// Tip: Ensure that the filesystem type is supported by the host
/// operating system. Examples: "ext4", "xfs", "ntfs". Implicitly
/// inferred to be "ext4" if unspecified. More info:
/// http://kubernetes.io/docs/user-guide/volumes#iscsi
/// </summary>
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }
/// <summary>
/// Gets or sets target iSCSI Qualified Name.
/// </summary>
[JsonProperty(PropertyName = "iqn")]
public string Iqn { get; set; }
/// <summary>
/// Gets or sets optional: Defaults to 'default' (tcp). iSCSI interface
/// name that uses an iSCSI transport.
/// </summary>
[JsonProperty(PropertyName = "iscsiInterface")]
public string IscsiInterface { get; set; }
/// <summary>
/// Gets or sets iSCSI target lun number.
/// </summary>
[JsonProperty(PropertyName = "lun")]
public int Lun { get; set; }
/// <summary>
/// Gets or sets iSCSI target portal List. The portal is either an IP
/// or ip_addr:port if the port is other than default (typically TCP
/// ports 860 and 3260).
/// </summary>
[JsonProperty(PropertyName = "portals")]
public IList<string> Portals { get; set; }
/// <summary>
/// Gets or sets readOnly here will force the ReadOnly setting in
/// VolumeMounts. Defaults to false.
/// </summary>
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Gets or sets iSCSI target portal. The portal is either an IP or
/// ip_addr:port if the port is other than default (typically TCP ports
/// 860 and 3260).
/// </summary>
[JsonProperty(PropertyName = "targetPortal")]
public string TargetPortal { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Iqn == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Iqn");
}
if (TargetPortal == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "TargetPortal");
}
}
}
}

116
src/generated/Models/V1Job.cs Executable file
View File

@@ -0,0 +1,116 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Job represents the configuration of a single job.
/// </summary>
public partial class V1Job
{
/// <summary>
/// Initializes a new instance of the V1Job class.
/// </summary>
public V1Job()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1Job 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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="metadata">Standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</param>
/// <param name="spec">Spec is a structure defining the expected
/// behavior of a job. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status</param>
/// <param name="status">Status is a structure describing current
/// status of a job. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status</param>
public V1Job(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1JobSpec spec = default(V1JobSpec), V1JobStatus status = default(V1JobStatus))
{
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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets spec is a structure defining the expected behavior of
/// a job. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
/// </summary>
[JsonProperty(PropertyName = "spec")]
public V1JobSpec Spec { get; set; }
/// <summary>
/// Gets or sets status is a structure describing current status of a
/// job. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
/// </summary>
[JsonProperty(PropertyName = "status")]
public V1JobStatus Status { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Spec != null)
{
Spec.Validate();
}
}
}
}

View File

@@ -0,0 +1,111 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// JobCondition describes current state of a job.
/// </summary>
public partial class V1JobCondition
{
/// <summary>
/// Initializes a new instance of the V1JobCondition class.
/// </summary>
public V1JobCondition()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1JobCondition class.
/// </summary>
/// <param name="status">Status of the condition, one of True, False,
/// Unknown.</param>
/// <param name="type">Type of job condition, Complete or
/// Failed.</param>
/// <param name="lastProbeTime">Last time the condition was
/// checked.</param>
/// <param name="lastTransitionTime">Last time the condition transit
/// from one status to another.</param>
/// <param name="message">Human readable message indicating details
/// about last transition.</param>
/// <param name="reason">(brief) reason for the condition's last
/// transition.</param>
public V1JobCondition(string status, string type, System.DateTime? lastProbeTime = default(System.DateTime?), System.DateTime? lastTransitionTime = default(System.DateTime?), string message = default(string), string reason = default(string))
{
LastProbeTime = lastProbeTime;
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 was checked.
/// </summary>
[JsonProperty(PropertyName = "lastProbeTime")]
public System.DateTime? LastProbeTime { get; set; }
/// <summary>
/// Gets or sets last time the condition transit 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 (brief) reason for the condition's last transition.
/// </summary>
[JsonProperty(PropertyName = "reason")]
public string Reason { get; set; }
/// <summary>
/// Gets or sets status of the condition, one of True, False, Unknown.
/// </summary>
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
/// <summary>
/// Gets or sets type of job condition, Complete or Failed.
/// </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");
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More