/*
 * 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>
    /// GetClusterHaResourcesSingle200ResponseData
    /// </summary>
    [DataContract(Name = "getClusterHaResourcesSingle_200_response_data")]
    public partial class GetClusterHaResourcesSingle200ResponseData : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetClusterHaResourcesSingle200ResponseData" /> class.
        /// </summary>
        /// <param name="comment">Description..</param>
        /// <param name="digest">Can be used to prevent concurrent modifications..</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="group">The HA group identifier..</param>
        /// <param name="maxRelocate">Maximal number of service relocate tries when a service failes to start..</param>
        /// <param name="maxRestart">Maximal number of tries to restart the service on a node after its start failed..</param>
        /// <param name="sid">HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100)..</param>
        /// <param name="state">Requested resource state..</param>
        /// <param name="type">The type of the resources..</param>
        public GetClusterHaResourcesSingle200ResponseData(string comment = default(string), string digest = default(string), Int64 failback = default(Int64), string group = default(string), Int64 maxRelocate = default(Int64), Int64 maxRestart = default(Int64), string sid = default(string), string state = default(string), string type = default(string))
        {
            this.Comment = comment;
            this.Digest = digest;
            this.Failback = failback;
            this.Group = group;
            this.MaxRelocate = maxRelocate;
            this.MaxRestart = maxRestart;
            this.Sid = sid;
            this.State = state;
            this.Type = type;
        }

        /// <summary>
        /// Description.
        /// </summary>
        /// <value>Description.</value>
        [DataMember(Name = "comment", EmitDefaultValue = false)]
        public string Comment { get; set; }

        /// <summary>
        /// Can be used to prevent concurrent modifications.
        /// </summary>
        /// <value>Can be used to prevent concurrent modifications.</value>
        [DataMember(Name = "digest", EmitDefaultValue = false)]
        public string Digest { 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>
        /// The HA group identifier.
        /// </summary>
        /// <value>The HA group identifier.</value>
        [DataMember(Name = "group", EmitDefaultValue = false)]
        public string Group { get; set; }

        /// <summary>
        /// Maximal number of service relocate tries when a service failes to start.
        /// </summary>
        /// <value>Maximal number of service relocate tries when a service failes to start.</value>
        [DataMember(Name = "max_relocate", EmitDefaultValue = false)]
        public Int64 MaxRelocate { get; set; }

        /// <summary>
        /// Maximal number of tries to restart the service on a node after its start failed.
        /// </summary>
        /// <value>Maximal number of tries to restart the service on a node after its start failed.</value>
        [DataMember(Name = "max_restart", EmitDefaultValue = false)]
        public Int64 MaxRestart { get; set; }

        /// <summary>
        /// HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).
        /// </summary>
        /// <value>HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).</value>
        [DataMember(Name = "sid", EmitDefaultValue = false)]
        public string Sid { get; set; }

        /// <summary>
        /// Requested resource state.
        /// </summary>
        /// <value>Requested resource state.</value>
        [DataMember(Name = "state", EmitDefaultValue = false)]
        public string State { get; set; }

        /// <summary>
        /// The type of the resources.
        /// </summary>
        /// <value>The type of the resources.</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 GetClusterHaResourcesSingle200ResponseData {\n");
            sb.Append("  Comment: ").Append(Comment).Append("\n");
            sb.Append("  Digest: ").Append(Digest).Append("\n");
            sb.Append("  Failback: ").Append(Failback).Append("\n");
            sb.Append("  Group: ").Append(Group).Append("\n");
            sb.Append("  MaxRelocate: ").Append(MaxRelocate).Append("\n");
            sb.Append("  MaxRestart: ").Append(MaxRestart).Append("\n");
            sb.Append("  Sid: ").Append(Sid).Append("\n");
            sb.Append("  State: ").Append(State).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;
        }
    }

}
