/*
* 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
{
///
/// TemplateApplyRemotes
///
[DataContract]
public partial class TemplateApplyRemotes : IEquatable
{
///
/// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
protected TemplateApplyRemotes()
{
}
///
/// Initializes a new instance of the class.
///
/// url (required).
/// contentType.
public TemplateApplyRemotes(string url = default, string contentType = default)
{
// to ensure "url" is required (not null)
if (url == null)
{
throw new InvalidDataException(
"url is a required property for TemplateApplyRemotes and cannot be null");
}
Url = url;
ContentType = contentType;
}
///
/// Gets or Sets Url
///
[DataMember(Name = "url", EmitDefaultValue = false)]
public string Url { get; set; }
///
/// Gets or Sets ContentType
///
[DataMember(Name = "contentType", EmitDefaultValue = false)]
public string ContentType { 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 TemplateApplyRemotes {\n");
sb.Append(" Url: ").Append(Url).Append("\n");
sb.Append(" ContentType: ").Append(ContentType).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 TemplateApplyRemotes);
}
///
/// Returns true if TemplateApplyRemotes instances are equal
///
/// Instance of TemplateApplyRemotes to be compared
/// Boolean
public bool Equals(TemplateApplyRemotes input)
{
if (input == null)
{
return false;
}
return
(
Url == input.Url ||
Url != null && Url.Equals(input.Url)
) &&
(
ContentType == input.ContentType ||
ContentType != null && ContentType.Equals(input.ContentType)
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
var hashCode = 41;
if (Url != null)
{
hashCode = hashCode * 59 + Url.GetHashCode();
}
if (ContentType != null)
{
hashCode = hashCode * 59 + ContentType.GetHashCode();
}
return hashCode;
}
}
}
}