/*
 * ProxMox VE API
 *
 * ProxMox VE API
 *
 * The version of the OpenAPI document: 2.0
 * Contact: support@lumaserv.com
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = ProxmoxSharp.Client.OpenAPIDateConverter;

namespace ProxmoxSharp.Model
{
    /// <summary>
    /// GetClusterHaStatusCurrent200ResponseDataInner
    /// </summary>
    [DataContract(Name = "getClusterHaStatusCurrent_200_response_data_inner")]
    public partial class GetClusterHaStatusCurrent200ResponseDataInner : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetClusterHaStatusCurrent200ResponseDataInner" /> class.
        /// </summary>
        /// <param name="crmState">For type &#39;service&#39;. Service state as seen by the CRM..</param>
        /// <param name="failback">The HA resource is automatically migrated to the node with the highest priority according to their node affinity rule, if a node with a higher priority than the current node comes online..</param>
        /// <param name="id">Status entry ID (quorum, master, lrm:&lt;node&gt;, service:&lt;sid&gt;)..</param>
        /// <param name="maxRelocate">For type &#39;service&#39;..</param>
        /// <param name="maxRestart">For type &#39;service&#39;..</param>
        /// <param name="node">Node associated to status entry..</param>
        /// <param name="quorate">For type &#39;quorum&#39;. Whether the cluster is quorate or not..</param>
        /// <param name="requestState">For type &#39;service&#39;. Requested service state..</param>
        /// <param name="sid">For type &#39;service&#39;. Service ID..</param>
        /// <param name="state">For type &#39;service&#39;. Verbose service state..</param>
        /// <param name="status">Status of the entry (value depends on type)..</param>
        /// <param name="timestamp">For type &#39;lrm&#39;,&#39;master&#39;. Timestamp of the status information..</param>
        /// <param name="type">Type of status entry..</param>
        public GetClusterHaStatusCurrent200ResponseDataInner(string crmState = default(string), Int64 failback = default(Int64), string id = default(string), Int64 maxRelocate = default(Int64), Int64 maxRestart = default(Int64), string node = default(string), Int64 quorate = default(Int64), string requestState = default(string), string sid = default(string), string state = default(string), string status = default(string), Int64 timestamp = default(Int64), string type = default(string))
        {
            this.CrmState = crmState;
            this.Failback = failback;
            this.Id = id;
            this.MaxRelocate = maxRelocate;
            this.MaxRestart = maxRestart;
            this.Node = node;
            this.Quorate = quorate;
            this.RequestState = requestState;
            this.Sid = sid;
            this.State = state;
            this.Status = status;
            this.Timestamp = timestamp;
            this.Type = type;
        }

        /// <summary>
        /// For type &#39;service&#39;. Service state as seen by the CRM.
        /// </summary>
        /// <value>For type &#39;service&#39;. Service state as seen by the CRM.</value>
        [DataMember(Name = "crm_state", EmitDefaultValue = false)]
        public string CrmState { get; set; }

        /// <summary>
        /// The HA resource is automatically migrated to the node with the highest priority according to their node affinity rule, if a node with a higher priority than the current node comes online.
        /// </summary>
        /// <value>The HA resource is automatically migrated to the node with the highest priority according to their node affinity rule, if a node with a higher priority than the current node comes online.</value>
        [DataMember(Name = "failback", EmitDefaultValue = false)]
        public Int64 Failback { get; set; }

        /// <summary>
        /// Status entry ID (quorum, master, lrm:&lt;node&gt;, service:&lt;sid&gt;).
        /// </summary>
        /// <value>Status entry ID (quorum, master, lrm:&lt;node&gt;, service:&lt;sid&gt;).</value>
        [DataMember(Name = "id", EmitDefaultValue = false)]
        public string Id { get; set; }

        /// <summary>
        /// For type &#39;service&#39;.
        /// </summary>
        /// <value>For type &#39;service&#39;.</value>
        [DataMember(Name = "max_relocate", EmitDefaultValue = false)]
        public Int64 MaxRelocate { get; set; }

        /// <summary>
        /// For type &#39;service&#39;.
        /// </summary>
        /// <value>For type &#39;service&#39;.</value>
        [DataMember(Name = "max_restart", EmitDefaultValue = false)]
        public Int64 MaxRestart { get; set; }

        /// <summary>
        /// Node associated to status entry.
        /// </summary>
        /// <value>Node associated to status entry.</value>
        [DataMember(Name = "node", EmitDefaultValue = false)]
        public string Node { get; set; }

        /// <summary>
        /// For type &#39;quorum&#39;. Whether the cluster is quorate or not.
        /// </summary>
        /// <value>For type &#39;quorum&#39;. Whether the cluster is quorate or not.</value>
        [DataMember(Name = "quorate", EmitDefaultValue = false)]
        public Int64 Quorate { get; set; }

        /// <summary>
        /// For type &#39;service&#39;. Requested service state.
        /// </summary>
        /// <value>For type &#39;service&#39;. Requested service state.</value>
        [DataMember(Name = "request_state", EmitDefaultValue = false)]
        public string RequestState { get; set; }

        /// <summary>
        /// For type &#39;service&#39;. Service ID.
        /// </summary>
        /// <value>For type &#39;service&#39;. Service ID.</value>
        [DataMember(Name = "sid", EmitDefaultValue = false)]
        public string Sid { get; set; }

        /// <summary>
        /// For type &#39;service&#39;. Verbose service state.
        /// </summary>
        /// <value>For type &#39;service&#39;. Verbose service state.</value>
        [DataMember(Name = "state", EmitDefaultValue = false)]
        public string State { get; set; }

        /// <summary>
        /// Status of the entry (value depends on type).
        /// </summary>
        /// <value>Status of the entry (value depends on type).</value>
        [DataMember(Name = "status", EmitDefaultValue = false)]
        public string Status { get; set; }

        /// <summary>
        /// For type &#39;lrm&#39;,&#39;master&#39;. Timestamp of the status information.
        /// </summary>
        /// <value>For type &#39;lrm&#39;,&#39;master&#39;. Timestamp of the status information.</value>
        [DataMember(Name = "timestamp", EmitDefaultValue = false)]
        public Int64 Timestamp { get; set; }

        /// <summary>
        /// Type of status entry.
        /// </summary>
        /// <value>Type of status entry.</value>
        [DataMember(Name = "type", EmitDefaultValue = false)]
        public string Type { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class GetClusterHaStatusCurrent200ResponseDataInner {\n");
            sb.Append("  CrmState: ").Append(CrmState).Append("\n");
            sb.Append("  Failback: ").Append(Failback).Append("\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  MaxRelocate: ").Append(MaxRelocate).Append("\n");
            sb.Append("  MaxRestart: ").Append(MaxRestart).Append("\n");
            sb.Append("  Node: ").Append(Node).Append("\n");
            sb.Append("  Quorate: ").Append(Quorate).Append("\n");
            sb.Append("  RequestState: ").Append(RequestState).Append("\n");
            sb.Append("  Sid: ").Append(Sid).Append("\n");
            sb.Append("  State: ").Append(State).Append("\n");
            sb.Append("  Status: ").Append(Status).Append("\n");
            sb.Append("  Timestamp: ").Append(Timestamp).Append("\n");
            sb.Append("  Type: ").Append(Type).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
