-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
DocumentModelCopyAuthorization.cs
56 lines (47 loc) · 3.14 KB
/
DocumentModelCopyAuthorization.cs
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using Azure.Core;
namespace Azure.AI.FormRecognizer.DocumentAnalysis
{
[CodeGenModel("CopyAuthorization")]
public partial class DocumentModelCopyAuthorization
{
/// <summary> Initializes a new instance of CopyAuthorization. </summary>
/// <param name="targetResourceId"> ID of the target Azure resource where the model should be copied to. </param>
/// <param name="targetResourceRegion"> Location of the target Azure resource where the model should be copied to. </param>
/// <param name="targetModelId"> Identifier of the target model. </param>
/// <param name="targetModelLocation"> URI of the copied model in the target account. </param>
/// <param name="accessToken"> Token used to authorize the request. </param>
/// <param name="expiresOn"> Date/time when the access token expires. </param>
/// <exception cref="ArgumentNullException"> <paramref name="targetResourceId"/>, <paramref name="targetResourceRegion"/>, <paramref name="targetModelId"/>, <paramref name="targetModelLocation"/> or <paramref name="accessToken"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="targetResourceId"/>, <paramref name="targetResourceRegion"/>, <paramref name="targetModelId"/> or <paramref name="accessToken"/> is empty. </exception>
public DocumentModelCopyAuthorization(string targetResourceId, string targetResourceRegion, string targetModelId, Uri targetModelLocation, string accessToken, DateTimeOffset expiresOn)
{
Argument.AssertNotNullOrEmpty(targetResourceId, nameof(targetResourceId));
Argument.AssertNotNullOrEmpty(targetResourceRegion, nameof(targetResourceRegion));
Argument.AssertNotNullOrEmpty(targetModelId, nameof(targetModelId));
Argument.AssertNotNull(targetModelLocation, nameof(targetModelLocation));
Argument.AssertNotNullOrEmpty(accessToken, nameof(accessToken));
TargetResourceId = targetResourceId;
TargetResourceRegion = targetResourceRegion;
TargetModelId = targetModelId;
TargetModelLocation = targetModelLocation;
AccessToken = accessToken;
ExpiresOn = expiresOn;
}
/// <summary> Location of the target Azure resource where the model should be copied to. </summary>
public string TargetResourceRegion { get; }
/// <summary> Identifier of the target model. </summary>
public string TargetModelId { get; }
/// <summary> URI of the copied model in the target account. </summary>
public Uri TargetModelLocation { get; }
/// <summary> Date/time when the access token expires. </summary>
[CodeGenMember("ExpirationDateTime")]
public DateTimeOffset ExpiresOn { get; }
/// <summary> Token used to authorize the request. </summary>
public string AccessToken { get; }
/// <summary> ID of the target Azure resource where the model should be copied to. </summary>
public string TargetResourceId { get; }
}
}