namespace FrostFS.SDK.Client; public readonly struct PrmObjectSearch( FrostFsContainerId containerId, FrostFsSessionToken? token, string[]? xheaders = null, params IObjectFilter[] filters) : ISessionToken, System.IEquatable { /// /// Defines container for the search /// /// public FrostFsContainerId ContainerId { get; } = containerId; /// /// Defines the search criteria /// /// Collection of filters public IObjectFilter[] Filters { get; } = filters; /// public FrostFsSessionToken? SessionToken { get; } = token; /// /// FrostFS request X-Headers /// public string[] XHeaders { get; } = xheaders ?? []; public override readonly bool Equals(object obj) { if (obj == null || obj is not PrmObjectSearch) return false; return Equals((PrmObjectSearch)obj); } public readonly bool Equals(PrmObjectSearch other) { return GetHashCode() == other.GetHashCode(); } public override readonly int GetHashCode() { return ContainerId.GetHashCode() ^ Filters.GetHashCode() ^ (SessionToken == null ? 0 : SessionToken.GetHashCode()) ^ XHeaders.GetHashCode(); } public static bool operator ==(PrmObjectSearch left, PrmObjectSearch right) { return left.Equals(right); } public static bool operator !=(PrmObjectSearch left, PrmObjectSearch right) { return !(left == right); } }