52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
namespace FrostFS.SDK.Client;
|
|
|
|
public readonly struct PrmContainerDelete(
|
|
FrostFsContainerId containerId,
|
|
PrmWait waitParams,
|
|
FrostFsSessionToken? sessionToken = null,
|
|
string[]? xheaders = null) : ISessionToken, System.IEquatable<PrmContainerDelete>
|
|
{
|
|
public FrostFsContainerId ContainerId { get; } = containerId;
|
|
|
|
/// <summary>
|
|
/// Since the container is removed with some delay, it needs to poll the container status
|
|
/// </summary>
|
|
/// <value>Rules for polling the result</value>
|
|
public PrmWait WaitParams { get; } = waitParams;
|
|
|
|
public FrostFsSessionToken? SessionToken { get; } = sessionToken;
|
|
|
|
/// <summary>
|
|
/// FrostFS request X-Headers
|
|
/// </summary>
|
|
public string[] XHeaders { get; } = xheaders ?? [];
|
|
|
|
public override readonly bool Equals(object obj)
|
|
{
|
|
if (obj == null || obj is not PrmContainerDelete)
|
|
return false;
|
|
|
|
return Equals((PrmContainerDelete)obj);
|
|
}
|
|
|
|
public readonly bool Equals(PrmContainerDelete other)
|
|
{
|
|
return ContainerId == other.ContainerId
|
|
&& WaitParams.Equals(other.WaitParams);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return ContainerId.GetHashCode() ^ WaitParams.GetHashCode();
|
|
}
|
|
|
|
public static bool operator ==(PrmContainerDelete left, PrmContainerDelete right)
|
|
{
|
|
return left.Equals(right);
|
|
}
|
|
|
|
public static bool operator !=(PrmContainerDelete left, PrmContainerDelete right)
|
|
{
|
|
return !(left == right);
|
|
}
|
|
}
|