-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
FrontDoorRoutePatch.cs
127 lines (119 loc) · 7.3 KB
/
FrontDoorRoutePatch.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Resources.Models;
namespace Azure.ResourceManager.Cdn.Models
{
/// <summary> The domain JSON object required for domain creation or update. </summary>
public partial class FrontDoorRoutePatch
{
/// <summary>
/// Keeps track of any properties unknown to the library.
/// <para>
/// To assign an object to the value of this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formatted json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
private IDictionary<string, BinaryData> _serializedAdditionalRawData;
/// <summary> Initializes a new instance of <see cref="FrontDoorRoutePatch"/>. </summary>
public FrontDoorRoutePatch()
{
CustomDomains = new ChangeTrackingList<FrontDoorActivatedResourceInfo>();
RuleSets = new ChangeTrackingList<WritableSubResource>();
SupportedProtocols = new ChangeTrackingList<FrontDoorEndpointProtocol>();
PatternsToMatch = new ChangeTrackingList<string>();
}
/// <summary> Initializes a new instance of <see cref="FrontDoorRoutePatch"/>. </summary>
/// <param name="endpointName"> The name of the endpoint which holds the route. </param>
/// <param name="customDomains"> Domains referenced by this endpoint. </param>
/// <param name="originGroup"> A reference to the origin group. </param>
/// <param name="originPath"> A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. </param>
/// <param name="ruleSets"> rule sets referenced by this endpoint. </param>
/// <param name="supportedProtocols"> List of supported protocols for this route. </param>
/// <param name="patternsToMatch"> The route patterns of the rule. </param>
/// <param name="cacheConfiguration"> The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. </param>
/// <param name="forwardingProtocol"> Protocol this rule will use when forwarding traffic to backends. </param>
/// <param name="linkToDefaultDomain"> whether this route will be linked to the default endpoint domain. </param>
/// <param name="httpsRedirect"> Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. </param>
/// <param name="enabledState"> Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal FrontDoorRoutePatch(string endpointName, IList<FrontDoorActivatedResourceInfo> customDomains, WritableSubResource originGroup, string originPath, IList<WritableSubResource> ruleSets, IList<FrontDoorEndpointProtocol> supportedProtocols, IList<string> patternsToMatch, FrontDoorRouteCacheConfiguration cacheConfiguration, ForwardingProtocol? forwardingProtocol, LinkToDefaultDomain? linkToDefaultDomain, HttpsRedirect? httpsRedirect, EnabledState? enabledState, IDictionary<string, BinaryData> serializedAdditionalRawData)
{
EndpointName = endpointName;
CustomDomains = customDomains;
OriginGroup = originGroup;
OriginPath = originPath;
RuleSets = ruleSets;
SupportedProtocols = supportedProtocols;
PatternsToMatch = patternsToMatch;
CacheConfiguration = cacheConfiguration;
ForwardingProtocol = forwardingProtocol;
LinkToDefaultDomain = linkToDefaultDomain;
HttpsRedirect = httpsRedirect;
EnabledState = enabledState;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
/// <summary> The name of the endpoint which holds the route. </summary>
public string EndpointName { get; }
/// <summary> Domains referenced by this endpoint. </summary>
public IList<FrontDoorActivatedResourceInfo> CustomDomains { get; }
/// <summary> A reference to the origin group. </summary>
internal WritableSubResource OriginGroup { get; set; }
/// <summary> Gets or sets Id. </summary>
public ResourceIdentifier OriginGroupId
{
get => OriginGroup is null ? default : OriginGroup.Id;
set
{
if (OriginGroup is null)
OriginGroup = new WritableSubResource();
OriginGroup.Id = value;
}
}
/// <summary> A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. </summary>
public string OriginPath { get; set; }
/// <summary> rule sets referenced by this endpoint. </summary>
public IList<WritableSubResource> RuleSets { get; }
/// <summary> List of supported protocols for this route. </summary>
public IList<FrontDoorEndpointProtocol> SupportedProtocols { get; }
/// <summary> The route patterns of the rule. </summary>
public IList<string> PatternsToMatch { get; }
/// <summary> The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. </summary>
public FrontDoorRouteCacheConfiguration CacheConfiguration { get; set; }
/// <summary> Protocol this rule will use when forwarding traffic to backends. </summary>
public ForwardingProtocol? ForwardingProtocol { get; set; }
/// <summary> whether this route will be linked to the default endpoint domain. </summary>
public LinkToDefaultDomain? LinkToDefaultDomain { get; set; }
/// <summary> Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. </summary>
public HttpsRedirect? HttpsRedirect { get; set; }
/// <summary> Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. </summary>
public EnabledState? EnabledState { get; set; }
}
}