46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
namespace FrostFS.SDK.Client;
|
|
|
|
public readonly struct PrmApeChainRemove(
|
|
FrostFsChainTarget target,
|
|
byte[] chainId,
|
|
string[]? xheaders = null) : System.IEquatable<PrmApeChainRemove>
|
|
{
|
|
public FrostFsChainTarget Target { get; } = target;
|
|
|
|
public byte[] ChainId { get; } = chainId;
|
|
|
|
/// <summary>
|
|
/// FrostFS request X-Headers
|
|
/// </summary>
|
|
public string[] XHeaders { get; } = xheaders ?? [];
|
|
|
|
public override readonly bool Equals(object obj)
|
|
{
|
|
if (obj == null || obj is not PrmApeChainRemove)
|
|
return false;
|
|
|
|
return Equals((PrmApeChainRemove)obj);
|
|
}
|
|
|
|
public readonly bool Equals(PrmApeChainRemove other)
|
|
{
|
|
return Target == other.Target
|
|
&& ChainId.Equals(other.ChainId)
|
|
&& XHeaders == other.XHeaders;
|
|
}
|
|
|
|
public override readonly int GetHashCode()
|
|
{
|
|
return ChainId.GetHashCode() ^ Target.GetHashCode() ^ XHeaders.GetHashCode();
|
|
}
|
|
|
|
public static bool operator ==(PrmApeChainRemove left, PrmApeChainRemove right)
|
|
{
|
|
return left.Equals(right);
|
|
}
|
|
|
|
public static bool operator !=(PrmApeChainRemove left, PrmApeChainRemove right)
|
|
{
|
|
return !(left == right);
|
|
}
|
|
}
|