/*
* 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
{
///
///
///
[DataContract]
public partial class CurrencyAddAssetBody : IEquatable
{
///
/// Gets or Sets CollectionId
///
[DataMember(Name = "collectionId")]
public int? CollectionId { get; set; }
///
/// Gets or Sets AssetName
///
[StringLength(32, MinimumLength = 1)]
[DataMember(Name = "assetName")]
public string AssetName { get; set; }
///
/// Gets or Sets AssetLink
///
[RegularExpression("/^(https?|ftp)://[^\\s/$.?#].[^\\s]*$/")]
[DataMember(Name = "assetLink")]
public string AssetLink { get; set; }
///
/// Returns the string presentation of the object
///
/// String presentation of the object
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();
}
///
/// Returns the JSON string presentation of the object
///
/// JSON string presentation of the object
public string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
///
/// Returns true if objects are equal
///
/// Object to be compared
/// Boolean
public override bool Equals(object obj)
{
return obj is not null && (ReferenceEquals(this, obj) || (obj.GetType() == GetType() && Equals((CurrencyAddAssetBody) obj)));
}
///
/// Returns true if CurrencyAddAssetBody instances are equal
///
/// Instance of CurrencyAddAssetBody to be compared
/// Boolean
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))
)));
}
///
/// Gets the hash code
///
/// Hash code
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
}
}