Policy.Autorest/custom/PolicyExemption.cs
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information. namespace Microsoft.Azure.PowerShell.Cmdlets.Policy.Models { public partial class PolicyExemption { /// <summary> /// The policy exemption metadata, exposed with its pre-migration named type /// <see cref="IPolicyExemptionPropertiesMetadata"/> instead of the raw <see cref="IAny"/>. /// The generated flattened property is renamed to <c>MetadataRaw</c> (see tspconfig.yaml) /// so this back-compatible accessor owns the <c>Metadata</c> name. It reads/writes the /// same underlying <c>Property.Metadata</c> storage, so behavior is unchanged. /// </summary> public Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemptionPropertiesMetadata Metadata { get => ((Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemptionPropertiesInternal)Property).Metadata as Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemptionPropertiesMetadata; set => ((Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemptionPropertiesInternal)Property).Metadata = value; } /// <summary> /// The resource selectors, exposed with their pre-migration element type /// <see cref="IResourceSelectorAutoGenerated"/> (the emitter renamed the element type to /// <see cref="IResourceSelector"/>). The generated flattened property is renamed to /// <c>ResourceSelectorRaw</c> (see tspconfig.yaml) so this back-compatible accessor owns the /// <c>ResourceSelector</c> name. Because <c>List<A></c> is not assignable to /// <c>List<B></c> even when the element types are compatible, the list is projected; /// the underlying elements are the same concrete <see cref="ResourceSelector"/> instances. /// </summary> public System.Collections.Generic.List<Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IResourceSelectorAutoGenerated> ResourceSelector { get { var __raw = ((Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemptionPropertiesInternal)Property).ResourceSelector; return __raw == null ? null : System.Linq.Enumerable.ToList(System.Linq.Enumerable.OfType<Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IResourceSelectorAutoGenerated>(__raw)); } set => ((Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemptionPropertiesInternal)Property).ResourceSelector = value == null ? null : System.Linq.Enumerable.ToList(System.Linq.Enumerable.OfType<Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IResourceSelector>(value)); } } public partial interface IPolicyExemption { /// <summary>The policy exemption metadata (restored named type, previously collapsed to IAny).</summary> Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IPolicyExemptionPropertiesMetadata Metadata { get; set; } /// <summary> /// The resource selectors. Restored to their pre-migration element type /// <see cref="IResourceSelectorAutoGenerated"/> (renamed to <see cref="IResourceSelector"/>). /// </summary> System.Collections.Generic.List<Microsoft.Azure.PowerShell.Cmdlets.Policy.Models.IResourceSelectorAutoGenerated> ResourceSelector { get; set; } } } |