/*
* 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
{
///
/// ScraperTargetResponse
///
[DataContract]
public partial class ScraperTargetResponse : ScraperTargetRequest, IEquatable
{
///
/// Initializes a new instance of the class.
///
/// The name of the organization..
/// The bucket name..
/// links.
public ScraperTargetResponse(string org = default, string bucket = default,
ScraperTargetResponseLinks links = default, string name = default, TypeEnum? type = default,
string url = default, string orgID = default, string bucketID = default, bool? allowInsecure = false) :
base(name, type, url, orgID, bucketID, allowInsecure)
{
Org = org;
Bucket = bucket;
Links = links;
}
///
/// Gets or Sets Id
///
[DataMember(Name = "id", EmitDefaultValue = false)]
public string Id { get; private set; }
///
/// The name of the organization.
///
/// The name of the organization.
[DataMember(Name = "org", EmitDefaultValue = false)]
public string Org { get; set; }
///
/// The bucket name.
///
/// The bucket name.
[DataMember(Name = "bucket", EmitDefaultValue = false)]
public string Bucket { get; set; }
///
/// Gets or Sets Links
///
[DataMember(Name = "links", EmitDefaultValue = false)]
public ScraperTargetResponseLinks Links { 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 ScraperTargetResponse {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Org: ").Append(Org).Append("\n");
sb.Append(" Bucket: ").Append(Bucket).Append("\n");
sb.Append(" Links: ").Append(Links).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
///
/// Returns the JSON string presentation of the object
///
/// JSON string presentation of the object
public override 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 ScraperTargetResponse);
}
///
/// Returns true if ScraperTargetResponse instances are equal
///
/// Instance of ScraperTargetResponse to be compared
/// Boolean
public bool Equals(ScraperTargetResponse input)
{
if (input == null)
{
return false;
}
return base.Equals(input) &&
(
Id == input.Id ||
Id != null && Id.Equals(input.Id)
) && base.Equals(input) &&
(
Org == input.Org ||
Org != null && Org.Equals(input.Org)
) && base.Equals(input) &&
(
Bucket == input.Bucket ||
Bucket != null && Bucket.Equals(input.Bucket)
) && base.Equals(input) && Links != null && Links.Equals(input.Links);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
var hashCode = base.GetHashCode();
if (Id != null)
{
hashCode = hashCode * 59 + Id.GetHashCode();
}
if (Org != null)
{
hashCode = hashCode * 59 + Org.GetHashCode();
}
if (Bucket != null)
{
hashCode = hashCode * 59 + Bucket.GetHashCode();
}
if (Links != null)
{
hashCode = hashCode * 59 + Links.GetHashCode();
}
return hashCode;
}
}
}
}