[#17] Client: Add extra parameter
API methods' parameters types with optional session, polling settings, xHeaders etc. and corresponding handlers have been added Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
00a1e9412f
commit
7b9c19f37c
42 changed files with 1054 additions and 386 deletions
44
src/FrostFS.SDK.ClientV2/Parameters/PrmPutObject.cs
Normal file
44
src/FrostFS.SDK.ClientV2/Parameters/PrmPutObject.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using FrostFS.SDK.ModelsV2;
|
||||
namespace FrostFS.SDK.ClientV2.Parameters;
|
||||
|
||||
public sealed class PrmPutObject : IContext, ISessionToken
|
||||
{
|
||||
/// <summary>
|
||||
/// Need to provide values like <c>ContainerId</c> and <c>ObjectType</c> to create and object.
|
||||
/// Optional parameters ike <c>Attributes</c> can be provided as well.
|
||||
/// </summary>
|
||||
/// <value>Header with required parameters to create an object</value>
|
||||
public ObjectHeader? Header { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A stream with source data
|
||||
/// </summary>
|
||||
public Stream? Payload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Object size is limited. In the data exceeds the limit, the object will be splitted.
|
||||
/// If the parameter is <c>true</c>, the client side cut is applied. Otherwise, the data is transferred
|
||||
/// as a stream and will be cut on server side.
|
||||
/// </summary>
|
||||
/// <value>Is client cut is applied</value>
|
||||
public bool ClientCut { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overrides default size of the buffer for stream transferring.
|
||||
/// </summary>
|
||||
/// <value>Size of the buffer</value>
|
||||
public int BufferMaxSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FrostFS request X-Headers
|
||||
/// </summary>
|
||||
public NameValueCollection XHeaders { get; set; } = [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Context? Context { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public SessionToken? SessionToken { get; set; }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue