seaweedfs/other/master-clients/csharp/src/Org.OpenAPITools/Model/Location.cs
Konstantin Lebedev 7c597c19c1 initial
2023-03-14 19:04:30 +05:00

143 lines
4.4 KiB
C#

/*
* 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
{
/// <summary>
/// Location
/// </summary>
[DataContract]
public partial class Location : IEquatable<Location>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Location" /> class.
/// </summary>
/// <param name="publicUrl">publicUrl.</param>
/// <param name="url">url.</param>
public Location(Object publicUrl = default(Object), Object url = default(Object))
{
this.PublicUrl = publicUrl;
this.Url = url;
this.PublicUrl = publicUrl;
this.Url = url;
}
/// <summary>
/// Gets or Sets PublicUrl
/// </summary>
[DataMember(Name="publicUrl", EmitDefaultValue=true)]
public Object PublicUrl { get; set; }
/// <summary>
/// Gets or Sets Url
/// </summary>
[DataMember(Name="url", EmitDefaultValue=true)]
public Object Url { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as Location);
}
/// <summary>
/// Returns true if Location instances are equal
/// </summary>
/// <param name="input">Instance of Location to be compared</param>
/// <returns>Boolean</returns>
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))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
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;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}