/*
 * 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>
    /// CreateClusterReplicationRequest
    /// </summary>
    [DataContract(Name = "CreateClusterReplicationRequest")]
    public partial class CreateClusterReplicationRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateClusterReplicationRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateClusterReplicationRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateClusterReplicationRequest" /> class.
        /// </summary>
        /// <param name="comment">comment.</param>
        /// <param name="disable">disable.</param>
        /// <param name="id">id (required).</param>
        /// <param name="rate">rate.</param>
        /// <param name="removeJob">removeJob.</param>
        /// <param name="schedule">schedule.</param>
        /// <param name="source">source.</param>
        /// <param name="target">target (required).</param>
        /// <param name="type">type (required).</param>
        public CreateClusterReplicationRequest(string comment = default(string), bool disable = default(bool), string id = default(string), decimal rate = default(decimal), string removeJob = default(string), string schedule = default(string), string source = default(string), string target = default(string), string type = default(string))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new ArgumentNullException("id is a required property for CreateClusterReplicationRequest and cannot be null");
            }
            this.Id = id;
            // to ensure "target" is required (not null)
            if (target == null)
            {
                throw new ArgumentNullException("target is a required property for CreateClusterReplicationRequest and cannot be null");
            }
            this.Target = target;
            // to ensure "type" is required (not null)
            if (type == null)
            {
                throw new ArgumentNullException("type is a required property for CreateClusterReplicationRequest and cannot be null");
            }
            this.Type = type;
            this.Comment = comment;
            this.Disable = disable;
            this.Rate = rate;
            this.RemoveJob = removeJob;
            this.Schedule = schedule;
            this.Source = source;
        }

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

        /// <summary>
        /// Gets or Sets Disable
        /// </summary>
        [DataMember(Name = "disable", EmitDefaultValue = true)]
        public bool Disable { get; set; }

        /// <summary>
        /// Gets or Sets Id
        /// </summary>
        [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
        public string Id { get; set; }

        /// <summary>
        /// Gets or Sets Rate
        /// </summary>
        [DataMember(Name = "rate", EmitDefaultValue = false)]
        public decimal Rate { get; set; }

        /// <summary>
        /// Gets or Sets RemoveJob
        /// </summary>
        [DataMember(Name = "remove_job", EmitDefaultValue = false)]
        public string RemoveJob { get; set; }

        /// <summary>
        /// Gets or Sets Schedule
        /// </summary>
        [DataMember(Name = "schedule", EmitDefaultValue = false)]
        public string Schedule { get; set; }

        /// <summary>
        /// Gets or Sets Source
        /// </summary>
        [DataMember(Name = "source", EmitDefaultValue = false)]
        public string Source { get; set; }

        /// <summary>
        /// Gets or Sets Target
        /// </summary>
        [DataMember(Name = "target", IsRequired = true, EmitDefaultValue = true)]
        public string Target { get; set; }

        /// <summary>
        /// Gets or Sets Type
        /// </summary>
        [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
        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 CreateClusterReplicationRequest {\n");
            sb.Append("  Comment: ").Append(Comment).Append("\n");
            sb.Append("  Disable: ").Append(Disable).Append("\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  Rate: ").Append(Rate).Append("\n");
            sb.Append("  RemoveJob: ").Append(RemoveJob).Append("\n");
            sb.Append("  Schedule: ").Append(Schedule).Append("\n");
            sb.Append("  Source: ").Append(Source).Append("\n");
            sb.Append("  Target: ").Append(Target).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;
        }
    }

}
