/*
* Seaweedfs Master Server API
*
* The Seaweedfs Master Server API allows you to store blobs
*
* The version of the OpenAPI document: 3.43.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 System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
namespace Org.OpenAPITools.Model
{
///
/// Location
///
[DataContract]
public partial class Location : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
///
/// publicUrl.
/// url.
public Location(Object publicUrl = default(Object), Object url = default(Object))
{
this.PublicUrl = publicUrl;
this.Url = url;
this.PublicUrl = publicUrl;
this.Url = url;
}
///
/// Gets or Sets PublicUrl
///
[DataMember(Name="publicUrl", EmitDefaultValue=true)]
public Object PublicUrl { get; set; }
///
/// Gets or Sets Url
///
[DataMember(Name="url", EmitDefaultValue=true)]
public Object Url { 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 Location {\n");
sb.Append(" PublicUrl: ").Append(PublicUrl).Append("\n");
sb.Append(" Url: ").Append(Url).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 Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
///
/// Returns true if objects are equal
///
/// Object to be compared
/// Boolean
public override bool Equals(object input)
{
return this.Equals(input as Location);
}
///
/// Returns true if Location instances are equal
///
/// Instance of Location to be compared
/// Boolean
public bool Equals(Location input)
{
if (input == null)
return false;
return
(
this.PublicUrl == input.PublicUrl ||
(this.PublicUrl != null &&
this.PublicUrl.Equals(input.PublicUrl))
) &&
(
this.Url == input.Url ||
(this.Url != null &&
this.Url.Equals(input.Url))
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.PublicUrl != null)
hashCode = hashCode * 59 + this.PublicUrl.GetHashCode();
if (this.Url != null)
hashCode = hashCode * 59 + this.Url.GetHashCode();
return hashCode;
}
}
///
/// To validate all properties of the instance
///
/// Validation context
/// Validation Result
IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}