frostfs-sdk-csharp/src/FrostFS.SDK.Client/Parameters/PrmApeChainRemove.cs
Pavel Gross 8835b23ed3
All checks were successful
DCO / DCO (pull_request) Successful in 23s
lint-build / dotnet8.0 (pull_request) Successful in 44s
lint-build / dotnet8.0 (push) Successful in 43s
[#34] Client: Add rules deserialization
Signed-off-by: Pavel Gross <p.gross@yadro.com>
2025-02-28 10:36:12 +03:00

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);
}
}