/*
* 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
{
///
/// TemplateExportByID
///
[DataContract]
public partial class TemplateExportByID : IEquatable
{
///
/// Initializes a new instance of the class.
///
/// stackID.
/// orgIDs.
/// resources.
public TemplateExportByID(string stackID = default, List orgIDs = default,
List resources = default)
{
StackID = stackID;
OrgIDs = orgIDs;
Resources = resources;
}
///
/// Gets or Sets StackID
///
[DataMember(Name = "stackID", EmitDefaultValue = false)]
public string StackID { get; set; }
///
/// Gets or Sets OrgIDs
///
[DataMember(Name = "orgIDs", EmitDefaultValue = false)]
public List OrgIDs { get; set; }
///
/// Gets or Sets Resources
///
[DataMember(Name = "resources", EmitDefaultValue = false)]
public List Resources { 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 TemplateExportByID {\n");
sb.Append(" StackID: ").Append(StackID).Append("\n");
sb.Append(" OrgIDs: ").Append(OrgIDs).Append("\n");
sb.Append(" Resources: ").Append(Resources).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 TemplateExportByID);
}
///
/// Returns true if TemplateExportByID instances are equal
///
/// Instance of TemplateExportByID to be compared
/// Boolean
public bool Equals(TemplateExportByID input)
{
if (input == null)
{
return false;
}
return
(
StackID == input.StackID ||
StackID != null && StackID.Equals(input.StackID)
) &&
(
OrgIDs == input.OrgIDs ||
OrgIDs != null &&
OrgIDs.SequenceEqual(input.OrgIDs)
) &&
(
Resources == input.Resources ||
Resources != null &&
Resources.SequenceEqual(input.Resources)
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
var hashCode = 41;
if (StackID != null)
{
hashCode = hashCode * 59 + StackID.GetHashCode();
}
if (OrgIDs != null)
{
hashCode = hashCode * 59 + OrgIDs.GetHashCode();
}
if (Resources != null)
{
hashCode = hashCode * 59 + Resources.GetHashCode();
}
return hashCode;
}
}
}
}