Skip to content

Commit bdede9b

Browse files
Migrate directives in cdn to rename-mapping (Azure#49674)
1 parent 2bd52ba commit bdede9b

27 files changed

+302
-829
lines changed

sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/ArmCdnModelFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static CdnEndpointData CdnEndpointData(ResourceIdentifier id = null, stri
6767
optimizationType,
6868
probePath,
6969
geoFilters?.ToList(),
70-
defaultOriginGroupId != null ? new EndpointPropertiesUpdateParametersDefaultOriginGroup(defaultOriginGroupId, serializedAdditionalRawData: null) : null,
70+
defaultOriginGroupId != null ? ResourceManagerModelFactory.WritableSubResource(defaultOriginGroupId) : null,
7171
uriSigningKeys?.ToList(),
7272
deliveryPolicy,
7373
webApplicationFirewallPolicyLinkId != null ? new EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(webApplicationFirewallPolicyLinkId, serializedAdditionalRawData: null) : null,

sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/CdnEndpointData.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Azure.Core;
88
using Azure.ResourceManager.Cdn.Models;
99
using Azure.ResourceManager.Models;
10+
using Azure.ResourceManager.Resources.Models;
1011

1112
namespace Azure.ResourceManager.Cdn
1213
{
@@ -40,7 +41,7 @@ public partial class CdnEndpointData
4041
/// <param name="resourceState"> Resource status of the endpoint. </param>
4142
/// <param name="provisioningState"> Provisioning status of the endpoint. </param>
4243
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
43-
internal CdnEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, ResourceManager.Models.SystemData systemData, IDictionary<string, string> tags, AzureLocation location, string originPath, IList<string> contentTypesToCompress, string originHostHeader, bool? isCompressionEnabled, bool? isHttpAllowed, bool? isHttpsAllowed, QueryStringCachingBehavior? queryStringCachingBehavior, OptimizationType? optimizationType, string probePath, IList<GeoFilter> geoFilters, EndpointPropertiesUpdateParametersDefaultOriginGroup defaultOriginGroup, IList<UriSigningKey> uriSigningKeys, EndpointDeliveryPolicy deliveryPolicy, EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink, string hostName, IList<DeepCreatedOrigin> origins, IList<DeepCreatedOriginGroup> originGroups, IReadOnlyList<CdnCustomDomainData> customDomains, EndpointResourceState? resourceState, CdnEndpointProvisioningState? provisioningState, IDictionary<string, BinaryData> serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
44+
internal CdnEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, ResourceManager.Models.SystemData systemData, IDictionary<string, string> tags, AzureLocation location, string originPath, IList<string> contentTypesToCompress, string originHostHeader, bool? isCompressionEnabled, bool? isHttpAllowed, bool? isHttpsAllowed, QueryStringCachingBehavior? queryStringCachingBehavior, OptimizationType? optimizationType, string probePath, IList<GeoFilter> geoFilters, WritableSubResource defaultOriginGroup, IList<UriSigningKey> uriSigningKeys, EndpointDeliveryPolicy deliveryPolicy, EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink, string hostName, IList<DeepCreatedOrigin> origins, IList<DeepCreatedOriginGroup> originGroups, IReadOnlyList<CdnCustomDomainData> customDomains, EndpointResourceState? resourceState, CdnEndpointProvisioningState? provisioningState, IDictionary<string, BinaryData> serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
4445
{
4546
OriginPath = originPath;
4647
ContentTypesToCompress = contentTypesToCompress;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using System;
7+
using Azure.Core;
8+
9+
namespace Azure.ResourceManager.Cdn.Models
10+
{
11+
public readonly partial struct CdnResourceType : IEquatable<CdnResourceType>
12+
{
13+
/// <summary>
14+
/// Microsoft.Cdn/Profiles/Endpoints
15+
/// </summary>
16+
[CodeGenMember("MicrosoftCdnProfilesEndpoints")]
17+
public static CdnResourceType Endpoints { get; } = new CdnResourceType(EndpointsValue);
18+
19+
/// <summary>
20+
/// Microsoft.Cdn/Profiles/AfdEndpoints
21+
/// </summary>
22+
[CodeGenMember("MicrosoftCdnProfilesAfdEndpoints")]
23+
public static CdnResourceType FrontDoorEndpoints { get; } = new CdnResourceType(FrontDoorEndpointsValue);
24+
}
25+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using Azure.Core;
7+
8+
namespace Azure.ResourceManager.Cdn.Models
9+
{
10+
// we have this customization because despite this is an internal class
11+
// it is still used as a parameter in an attribute, therefore its name should not change
12+
// comparing with the last stable release.
13+
// this customization is changing the name back.
14+
[CodeGenModel("UnknownSecretParameters")]
15+
internal partial class UnknownSecretProperties
16+
{
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using Azure.Core;
7+
8+
namespace Azure.ResourceManager.Cdn.Models
9+
{
10+
// we have this customization because despite this is an internal class
11+
// it is still used as a parameter in an attribute, therefore its name should not change
12+
// comparing with the last stable release.
13+
// this customization is changing the name back.
14+
[CodeGenModel("UnknownSecurityPolicyPropertiesParameters")]
15+
internal partial class UnknownSecurityPolicyProperties
16+
{
17+
}
18+
}

sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ArmCdnModelFactory.cs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.Serialization.cs

Lines changed: 5 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.Serialization.cs

Lines changed: 4 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)