/* * InfluxDB OSS API Service * * The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. * * OpenAPI spec version: 2.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ using System; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using OpenAPIDateConverter = InfluxDB.Client.Api.Client.OpenAPIDateConverter; namespace InfluxDB.Client.Api.Domain { /// /// TemplateApply /// [DataContract] public partial class TemplateApply : IEquatable { /// /// Initializes a new instance of the class. /// /// dryRun. /// orgID. /// stackID. /// template. /// templates. /// envRefs. /// secrets. /// remotes. /// actions. public TemplateApply(bool? dryRun = default, string orgID = default, string stackID = default, TemplateApplyTemplate template = default, List templates = default, Dictionary envRefs = default, Dictionary secrets = default, List remotes = default, List actions = default) { DryRun = dryRun; OrgID = orgID; StackID = stackID; Template = template; Templates = templates; EnvRefs = envRefs; Secrets = secrets; Remotes = remotes; Actions = actions; } /// /// Gets or Sets DryRun /// [DataMember(Name = "dryRun", EmitDefaultValue = false)] public bool? DryRun { get; set; } /// /// Gets or Sets OrgID /// [DataMember(Name = "orgID", EmitDefaultValue = false)] public string OrgID { get; set; } /// /// Gets or Sets StackID /// [DataMember(Name = "stackID", EmitDefaultValue = false)] public string StackID { get; set; } /// /// Gets or Sets Template /// [DataMember(Name = "template", EmitDefaultValue = false)] public TemplateApplyTemplate Template { get; set; } /// /// Gets or Sets Templates /// [DataMember(Name = "templates", EmitDefaultValue = false)] public List Templates { get; set; } /// /// Gets or Sets EnvRefs /// [DataMember(Name = "envRefs", EmitDefaultValue = false)] public Dictionary EnvRefs { get; set; } /// /// Gets or Sets Secrets /// [DataMember(Name = "secrets", EmitDefaultValue = false)] public Dictionary Secrets { get; set; } /// /// Gets or Sets Remotes /// [DataMember(Name = "remotes", EmitDefaultValue = false)] public List Remotes { get; set; } /// /// Gets or Sets Actions /// [DataMember(Name = "actions", EmitDefaultValue = false)] public List Actions { get; set; } /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { var sb = new StringBuilder(); sb.Append("class TemplateApply {\n"); sb.Append(" DryRun: ").Append(DryRun).Append("\n"); sb.Append(" OrgID: ").Append(OrgID).Append("\n"); sb.Append(" StackID: ").Append(StackID).Append("\n"); sb.Append(" Template: ").Append(Template).Append("\n"); sb.Append(" Templates: ").Append(Templates).Append("\n"); sb.Append(" EnvRefs: ").Append(EnvRefs).Append("\n"); sb.Append(" Secrets: ").Append(Secrets).Append("\n"); sb.Append(" Remotes: ").Append(Remotes).Append("\n"); sb.Append(" Actions: ").Append(Actions).Append("\n"); sb.Append("}\n"); return sb.ToString(); } /// /// Returns the JSON string presentation of the object /// /// JSON string presentation of the object public virtual string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean public override bool Equals(object input) { return Equals(input as TemplateApply); } /// /// Returns true if TemplateApply instances are equal /// /// Instance of TemplateApply to be compared /// Boolean public bool Equals(TemplateApply input) { if (input == null) { return false; } return ( DryRun == input.DryRun || DryRun != null && DryRun.Equals(input.DryRun) ) && ( OrgID == input.OrgID || OrgID != null && OrgID.Equals(input.OrgID) ) && ( StackID == input.StackID || StackID != null && StackID.Equals(input.StackID) ) && Template != null && Template.Equals(input.Template) && ( Templates == input.Templates || Templates != null && Templates.SequenceEqual(input.Templates) ) && ( EnvRefs == input.EnvRefs || EnvRefs != null && EnvRefs.SequenceEqual(input.EnvRefs) ) && ( Secrets == input.Secrets || Secrets != null && Secrets.SequenceEqual(input.Secrets) ) && ( Remotes == input.Remotes || Remotes != null && Remotes.SequenceEqual(input.Remotes) ) && ( Actions == input.Actions || Actions != null && Actions.SequenceEqual(input.Actions) ); } /// /// Gets the hash code /// /// Hash code public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (DryRun != null) { hashCode = hashCode * 59 + DryRun.GetHashCode(); } if (OrgID != null) { hashCode = hashCode * 59 + OrgID.GetHashCode(); } if (StackID != null) { hashCode = hashCode * 59 + StackID.GetHashCode(); } if (Template != null) { hashCode = hashCode * 59 + Template.GetHashCode(); } if (Templates != null) { hashCode = hashCode * 59 + Templates.GetHashCode(); } if (EnvRefs != null) { hashCode = hashCode * 59 + EnvRefs.GetHashCode(); } if (Secrets != null) { hashCode = hashCode * 59 + Secrets.GetHashCode(); } if (Remotes != null) { hashCode = hashCode * 59 + Remotes.GetHashCode(); } if (Actions != null) { hashCode = hashCode * 59 + Actions.GetHashCode(); } return hashCode; } } } }