-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPaperlessOptions.cs
More file actions
27 lines (21 loc) · 955 Bytes
/
PaperlessOptions.cs
File metadata and controls
27 lines (21 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2022 Valters Melnalksnis
// Licensed under the Apache License 2.0.
// See LICENSE file in the project root for full license information.
using System;
using System.ComponentModel.DataAnnotations;
namespace VMelnalksnis.PaperlessDotNet;
/// <summary>Options for configuring <see cref="IPaperlessClient"/>.</summary>
public sealed class PaperlessOptions
{
/// <summary>The name of the configuration section.</summary>
public const string Name = "Paperless";
/// <summary>Gets or sets the base address of the Paperless API.</summary>
[Required]
public Uri BaseAddress { get; set; } = null!;
/// <summary>Gets or sets the authentication token to use with all requests.</summary>
[Required]
public string Token { get; set; } = null!;
/// <summary> Gets or sets the time delay between each polling of tasks in milliseconds.</summary>
[Required]
public TimeSpan TaskPollingDelay { get; set; } = TimeSpan.FromMilliseconds(250);
}