// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.ContainerRegistry.Models
{
    using Azure;
    using Management;
    using ContainerRegistry;
    using Rest;
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// The SKU of a container registry.
    /// </summary>
    public partial class Sku
    {
        /// <summary>
        /// Initializes a new instance of the Sku class.
        /// </summary>
        public Sku() { }

        /// <summary>
        /// Initializes a new instance of the Sku class.
        /// </summary>
        /// <param name="name">The SKU name of the the container registry.
        /// Required for registry creation. Allowed value: Basic.</param>
        /// <param name="tier">The SKU tier based on the SKU name. Possible
        /// values include: 'Basic'</param>
        public Sku(string name, string tier = default(string))
        {
            Name = name;
            Tier = tier;
        }

        /// <summary>
        /// Gets or sets the SKU name of the the container registry. Required
        /// for registry creation. Allowed value: Basic.
        /// </summary>
        [JsonProperty(PropertyName = "name")]
        public string Name { get; set; }

        /// <summary>
        /// Gets the SKU tier based on the SKU name. Possible values include:
        /// 'Basic'
        /// </summary>
        [JsonProperty(PropertyName = "tier")]
        public string Tier { get; protected 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");
            }
        }
    }
}

