[#30] Client: Add object model for Rules

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2025-02-12 04:20:01 +03:00
parent 43e300c773
commit 195854a45b
27 changed files with 677 additions and 155 deletions

View file

@ -1,13 +1,16 @@
namespace FrostFS.SDK.Client;
using System;
using FrostFS.SDK.Client;
namespace FrostFS.SDK.Client;
public readonly struct PrmApeChainRemove(
FrostFsChainTarget target,
FrostFsChain chain,
byte[] chainId,
string[]? xheaders = null) : System.IEquatable<PrmApeChainRemove>
{
public FrostFsChainTarget Target { get; } = target;
public FrostFsChain Chain { get; } = chain;
public byte[] ChainId { get; } = chainId;
/// <summary>
/// FrostFS request X-Headers
@ -25,13 +28,13 @@ public readonly struct PrmApeChainRemove(
public readonly bool Equals(PrmApeChainRemove other)
{
return Target == other.Target
&& Chain == other.Chain
&& ChainId.Equals(other.ChainId)
&& XHeaders == other.XHeaders;
}
public override readonly int GetHashCode()
{
return Chain.GetHashCode() ^ Target.GetHashCode() ^ XHeaders.GetHashCode();
return ChainId.GetHashCode() ^ Target.GetHashCode() ^ XHeaders.GetHashCode();
}
public static bool operator ==(PrmApeChainRemove left, PrmApeChainRemove right)