// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Compute.Fluent.Models
{
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// Api error.
    /// </summary>
    public partial class ApiError
    {
        /// <summary>
        /// Initializes a new instance of the ApiError class.
        /// </summary>
        public ApiError()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the ApiError class.
        /// </summary>
        /// <param name="details">The Api error details</param>
        /// <param name="innererror">The Api inner error</param>
        /// <param name="code">The error code.</param>
        /// <param name="target">The target of the particular error.</param>
        /// <param name="message">The error message.</param>
        public ApiError(IList<ApiErrorBase> details = default(IList<ApiErrorBase>), InnerError innererror = default(InnerError), string code = default(string), string target = default(string), string message = default(string))
        {
            Details = details;
            Innererror = innererror;
            Code = code;
            Target = target;
            Message = message;
            CustomInit();
        }

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

        /// <summary>
        /// Gets or sets the Api error details
        /// </summary>
        [JsonProperty(PropertyName = "details")]
        public IList<ApiErrorBase> Details { get; set; }

        /// <summary>
        /// Gets or sets the Api inner error
        /// </summary>
        [JsonProperty(PropertyName = "innererror")]
        public InnerError Innererror { get; set; }

        /// <summary>
        /// Gets or sets the error code.
        /// </summary>
        [JsonProperty(PropertyName = "code")]
        public string Code { get; set; }

        /// <summary>
        /// Gets or sets the target of the particular error.
        /// </summary>
        [JsonProperty(PropertyName = "target")]
        public string Target { get; set; }

        /// <summary>
        /// Gets or sets the error message.
        /// </summary>
        [JsonProperty(PropertyName = "message")]
        public string Message { get; set; }

    }
}
