-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
Output.cs
60 lines (55 loc) · 2.1 KB
/
Output.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
57
58
59
60
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Azure.Provisioning
{
/// <summary>
/// Represents an output of an <see cref="IConstruct"/>.
/// </summary>
#pragma warning disable AZC0012 // Avoid single word type names
public class Output
#pragma warning restore AZC0012 // Avoid single word type names
{
/// <summary>
/// Gets the name of the output.
/// </summary>
public string Name { get; }
/// <summary>
/// Gets the value of the output.
/// </summary>
public string Value { get; }
/// <summary>
/// Gets a value indicating whether the output is a literal value.
/// </summary>
public bool IsLiteral { get; }
/// <summary>
/// Gets a value indicating whether the output is secure.
/// </summary>
public bool IsSecure { get; }
/// <summary>
/// Gets the type of the output.
/// </summary>
public BicepType OutputType { get; }
internal IConstruct Source { get; }
internal Resource Resource { get; }
/// <summary>
/// Initializes a new instance of the <see cref="Output"/>.
/// </summary>
/// <param name="name">The output name.</param>
/// <param name="value">The output value.</param>
/// <param name="source">The output source.</param>
/// <param name="resource">The output resource.</param>
/// <param name="isLiteral">Is the output a literal value.</param>
/// <param name="isSecure">Is the output secure.</param>
/// <param name="outputType">The type of the output.</param>
internal Output(string name, string value, IConstruct source, Resource resource, bool isLiteral = false, bool isSecure = false, BicepType outputType = BicepType.String)
{
Name = name;
Value = value;
IsLiteral = isLiteral;
IsSecure = isSecure;
Source = source;
Resource = resource;
OutputType = outputType;
}
}
}