Files
bank-backend/src/IO.Swagger/Models/RequestDto/CurrencyAddAssetBody.cs

137 lines
4.5 KiB
C#

/*
* T&J Central Bank API
*
* API documentation for T&J Central Bank's digital wallets
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using Newtonsoft.Json;
using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using System.Text;
namespace IO.Swagger.Models.RequestDto
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class CurrencyAddAssetBody : IEquatable<CurrencyAddAssetBody>
{
/// <summary>
/// Gets or Sets CollectionId
/// </summary>
[DataMember(Name = "collectionId")]
public int? CollectionId { get; set; }
/// <summary>
/// Gets or Sets AssetName
/// </summary>
[StringLength(32, MinimumLength = 1)]
[DataMember(Name = "assetName")]
public string AssetName { get; set; }
/// <summary>
/// Gets or Sets AssetLink
/// </summary>
[RegularExpression("/^(https?|ftp)://[^\\s/$.?#].[^\\s]*$/")]
[DataMember(Name = "assetLink")]
public string AssetLink { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new();
StringBuilder unused4 = sb.Append("class CurrencyAddAssetBody {\n");
StringBuilder unused3 = sb.Append(" CollectionId: ").Append(CollectionId).Append('\n');
StringBuilder unused2 = sb.Append(" AssetName: ").Append(AssetName).Append('\n');
StringBuilder unused1 = sb.Append(" AssetLink: ").Append(AssetLink).Append('\n');
StringBuilder unused = 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 string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
return obj is not null && (ReferenceEquals(this, obj) || (obj.GetType() == GetType() && Equals((CurrencyAddAssetBody) obj)));
}
/// <summary>
/// Returns true if CurrencyAddAssetBody instances are equal
/// </summary>
/// <param name="other">Instance of CurrencyAddAssetBody to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(CurrencyAddAssetBody other)
{
return other is not null
&& (ReferenceEquals(this, other)
|| ((
CollectionId == other.CollectionId ||
(CollectionId != null &&
CollectionId.Equals(other.CollectionId))
) &&
(
AssetName == other.AssetName ||
(AssetName != null &&
AssetName.Equals(other.AssetName))
) &&
(
AssetLink == other.AssetLink ||
(AssetLink != null &&
AssetLink.Equals(other.AssetLink))
)));
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
// Suitable nullity checks etc, of course :)
if (CollectionId != null)
hashCode = (hashCode * 59) + CollectionId.GetHashCode();
if (AssetName != null)
hashCode = (hashCode * 59) + AssetName.GetHashCode();
if (AssetLink != null)
hashCode = (hashCode * 59) + AssetLink.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
public static bool operator ==(CurrencyAddAssetBody left, CurrencyAddAssetBody right) => Equals(left, right);
public static bool operator !=(CurrencyAddAssetBody left, CurrencyAddAssetBody right) => !Equals(left, right);
#pragma warning restore 1591
#endregion Operators
}
}