// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace k8s.Models
{
    using Microsoft.Rest;
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// CustomResourceDefinitionNames indicates the names to serve this
    /// CustomResourceDefinition
    /// </summary>
    public partial class V1beta1CustomResourceDefinitionNames
    {
        /// <summary>
        /// Initializes a new instance of the
        /// V1beta1CustomResourceDefinitionNames class.
        /// </summary>
        public V1beta1CustomResourceDefinitionNames()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the
        /// V1beta1CustomResourceDefinitionNames class.
        /// </summary>
        /// <param name="kind">Kind is the serialized kind of the resource.  It
        /// is normally CamelCase and singular.</param>
        /// <param name="plural">Plural is the plural name of the resource to
        /// serve.  It must match the name of the
        /// CustomResourceDefinition-registration too: plural.group and it must
        /// be all lowercase.</param>
        /// <param name="categories">Categories is a list of grouped resources
        /// custom resources belong to (e.g. 'all')</param>
        /// <param name="listKind">ListKind is the serialized kind of the list
        /// for this resource.  Defaults to &lt;kind&gt;List.</param>
        /// <param name="shortNames">ShortNames are short names for the
        /// resource.  It must be all lowercase.</param>
        /// <param name="singular">Singular is the singular name of the
        /// resource.  It must be all lowercase  Defaults to lowercased
        /// &lt;kind&gt;</param>
        public V1beta1CustomResourceDefinitionNames(string kind, string plural, IList<string> categories = default(IList<string>), string listKind = default(string), IList<string> shortNames = default(IList<string>), string singular = default(string))
        {
            Categories = categories;
            Kind = kind;
            ListKind = listKind;
            Plural = plural;
            ShortNames = shortNames;
            Singular = singular;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets categories is a list of grouped resources custom
        /// resources belong to (e.g. 'all')
        /// </summary>
        [JsonProperty(PropertyName = "categories")]
        public IList<string> Categories { get; set; }

        /// <summary>
        /// Gets or sets kind is the serialized kind of the resource.  It is
        /// normally CamelCase and singular.
        /// </summary>
        [JsonProperty(PropertyName = "kind")]
        public string Kind { get; set; }

        /// <summary>
        /// Gets or sets listKind is the serialized kind of the list for this
        /// resource.  Defaults to &amp;lt;kind&amp;gt;List.
        /// </summary>
        [JsonProperty(PropertyName = "listKind")]
        public string ListKind { get; set; }

        /// <summary>
        /// Gets or sets plural is the plural name of the resource to serve.
        /// It must match the name of the CustomResourceDefinition-registration
        /// too: plural.group and it must be all lowercase.
        /// </summary>
        [JsonProperty(PropertyName = "plural")]
        public string Plural { get; set; }

        /// <summary>
        /// Gets or sets shortNames are short names for the resource.  It must
        /// be all lowercase.
        /// </summary>
        [JsonProperty(PropertyName = "shortNames")]
        public IList<string> ShortNames { get; set; }

        /// <summary>
        /// Gets or sets singular is the singular name of the resource.  It
        /// must be all lowercase  Defaults to lowercased &amp;lt;kind&amp;gt;
        /// </summary>
        [JsonProperty(PropertyName = "singular")]
        public string Singular { 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 (Plural == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "Plural");
            }
        }
    }
}
