Files
csharp/src/KubernetesClient/generated/Models/V1beta1CustomResourceConversion.cs
Boshi Lian 1600e44b00 generate for 1.13 (#223)
* generate for 1.13 and bump ver to 1.4

* fix examples for 1.13

* update outdated cert
2018-12-11 21:10:39 -08:00

92 lines
3.6 KiB
C#

// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// CustomResourceConversion describes how to convert different versions of
/// a CR.
/// </summary>
public partial class V1beta1CustomResourceConversion
{
/// <summary>
/// Initializes a new instance of the V1beta1CustomResourceConversion
/// class.
/// </summary>
public V1beta1CustomResourceConversion()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1beta1CustomResourceConversion
/// class.
/// </summary>
/// <param name="strategy">`strategy` specifies the conversion
/// strategy. Allowed values are: - `None`: The converter only change
/// the apiVersion and would not touch any other field in the CR. -
/// `Webhook`: API Server will call to an external webhook to do the
/// conversion. Additional information is needed for this
/// option.</param>
/// <param name="webhookClientConfig">`webhookClientConfig` is the
/// instructions for how to call the webhook if strategy is `Webhook`.
/// This field is alpha-level and is only honored by servers that
/// enable the CustomResourceWebhookConversion feature.</param>
public V1beta1CustomResourceConversion(string strategy, Apiextensionsv1beta1WebhookClientConfig webhookClientConfig = default(Apiextensionsv1beta1WebhookClientConfig))
{
Strategy = strategy;
WebhookClientConfig = webhookClientConfig;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets `strategy` specifies the conversion strategy. Allowed
/// values are: - `None`: The converter only change the apiVersion and
/// would not touch any other field in the CR. - `Webhook`: API Server
/// will call to an external webhook to do the conversion. Additional
/// information is needed for this option.
/// </summary>
[JsonProperty(PropertyName = "strategy")]
public string Strategy { get; set; }
/// <summary>
/// Gets or sets `webhookClientConfig` is the instructions for how to
/// call the webhook if strategy is `Webhook`. This field is
/// alpha-level and is only honored by servers that enable the
/// CustomResourceWebhookConversion feature.
/// </summary>
[JsonProperty(PropertyName = "webhookClientConfig")]
public Apiextensionsv1beta1WebhookClientConfig WebhookClientConfig { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Strategy == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Strategy");
}
if (WebhookClientConfig != null)
{
WebhookClientConfig.Validate();
}
}
}
}