/*
* 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
{
///
/// TemplateSummaryDiff
///
[DataContract]
public partial class TemplateSummaryDiff : IEquatable
{
///
/// Initializes a new instance of the class.
///
/// buckets.
/// checks.
/// dashboards.
/// labels.
/// labelMappings.
/// notificationEndpoints.
/// notificationRules.
/// tasks.
/// telegrafConfigs.
/// variables.
public TemplateSummaryDiff(List buckets = default,
List checks = default, List dashboards = default,
List labels = default,
List labelMappings = default,
List notificationEndpoints = default,
List notificationRules = default,
List tasks = default,
List telegrafConfigs = default,
List variables = default)
{
Buckets = buckets;
Checks = checks;
Dashboards = dashboards;
Labels = labels;
LabelMappings = labelMappings;
NotificationEndpoints = notificationEndpoints;
NotificationRules = notificationRules;
Tasks = tasks;
TelegrafConfigs = telegrafConfigs;
Variables = variables;
}
///
/// Gets or Sets Buckets
///
[DataMember(Name = "buckets", EmitDefaultValue = false)]
public List Buckets { get; set; }
///
/// Gets or Sets Checks
///
[DataMember(Name = "checks", EmitDefaultValue = false)]
public List Checks { get; set; }
///
/// Gets or Sets Dashboards
///
[DataMember(Name = "dashboards", EmitDefaultValue = false)]
public List Dashboards { get; set; }
///
/// Gets or Sets Labels
///
[DataMember(Name = "labels", EmitDefaultValue = false)]
public List Labels { get; set; }
///
/// Gets or Sets LabelMappings
///
[DataMember(Name = "labelMappings", EmitDefaultValue = false)]
public List LabelMappings { get; set; }
///
/// Gets or Sets NotificationEndpoints
///
[DataMember(Name = "notificationEndpoints", EmitDefaultValue = false)]
public List NotificationEndpoints { get; set; }
///
/// Gets or Sets NotificationRules
///
[DataMember(Name = "notificationRules", EmitDefaultValue = false)]
public List NotificationRules { get; set; }
///
/// Gets or Sets Tasks
///
[DataMember(Name = "tasks", EmitDefaultValue = false)]
public List Tasks { get; set; }
///
/// Gets or Sets TelegrafConfigs
///
[DataMember(Name = "telegrafConfigs", EmitDefaultValue = false)]
public List TelegrafConfigs { get; set; }
///
/// Gets or Sets Variables
///
[DataMember(Name = "variables", EmitDefaultValue = false)]
public List Variables { 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 TemplateSummaryDiff {\n");
sb.Append(" Buckets: ").Append(Buckets).Append("\n");
sb.Append(" Checks: ").Append(Checks).Append("\n");
sb.Append(" Dashboards: ").Append(Dashboards).Append("\n");
sb.Append(" Labels: ").Append(Labels).Append("\n");
sb.Append(" LabelMappings: ").Append(LabelMappings).Append("\n");
sb.Append(" NotificationEndpoints: ").Append(NotificationEndpoints).Append("\n");
sb.Append(" NotificationRules: ").Append(NotificationRules).Append("\n");
sb.Append(" Tasks: ").Append(Tasks).Append("\n");
sb.Append(" TelegrafConfigs: ").Append(TelegrafConfigs).Append("\n");
sb.Append(" Variables: ").Append(Variables).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 TemplateSummaryDiff);
}
///
/// Returns true if TemplateSummaryDiff instances are equal
///
/// Instance of TemplateSummaryDiff to be compared
/// Boolean
public bool Equals(TemplateSummaryDiff input)
{
if (input == null)
{
return false;
}
return
(
Buckets == input.Buckets ||
Buckets != null &&
Buckets.SequenceEqual(input.Buckets)
) &&
(
Checks == input.Checks ||
Checks != null &&
Checks.SequenceEqual(input.Checks)
) &&
(
Dashboards == input.Dashboards ||
Dashboards != null &&
Dashboards.SequenceEqual(input.Dashboards)
) &&
(
Labels == input.Labels ||
Labels != null &&
Labels.SequenceEqual(input.Labels)
) &&
(
LabelMappings == input.LabelMappings ||
LabelMappings != null &&
LabelMappings.SequenceEqual(input.LabelMappings)
) &&
(
NotificationEndpoints == input.NotificationEndpoints ||
NotificationEndpoints != null &&
NotificationEndpoints.SequenceEqual(input.NotificationEndpoints)
) &&
(
NotificationRules == input.NotificationRules ||
NotificationRules != null &&
NotificationRules.SequenceEqual(input.NotificationRules)
) &&
(
Tasks == input.Tasks ||
Tasks != null &&
Tasks.SequenceEqual(input.Tasks)
) &&
(
TelegrafConfigs == input.TelegrafConfigs ||
TelegrafConfigs != null &&
TelegrafConfigs.SequenceEqual(input.TelegrafConfigs)
) &&
(
Variables == input.Variables ||
Variables != null &&
Variables.SequenceEqual(input.Variables)
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
var hashCode = 41;
if (Buckets != null)
{
hashCode = hashCode * 59 + Buckets.GetHashCode();
}
if (Checks != null)
{
hashCode = hashCode * 59 + Checks.GetHashCode();
}
if (Dashboards != null)
{
hashCode = hashCode * 59 + Dashboards.GetHashCode();
}
if (Labels != null)
{
hashCode = hashCode * 59 + Labels.GetHashCode();
}
if (LabelMappings != null)
{
hashCode = hashCode * 59 + LabelMappings.GetHashCode();
}
if (NotificationEndpoints != null)
{
hashCode = hashCode * 59 + NotificationEndpoints.GetHashCode();
}
if (NotificationRules != null)
{
hashCode = hashCode * 59 + NotificationRules.GetHashCode();
}
if (Tasks != null)
{
hashCode = hashCode * 59 + Tasks.GetHashCode();
}
if (TelegrafConfigs != null)
{
hashCode = hashCode * 59 + TelegrafConfigs.GetHashCode();
}
if (Variables != null)
{
hashCode = hashCode * 59 + Variables.GetHashCode();
}
return hashCode;
}
}
}
}