/// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="OriginGroupOverrideAction" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OriginGroupOverrideAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json);
            { _parameter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideActionParameters.FromJson(__jsonParameters) : Parameter; }
            AfterFromJson(json);
        }
Exemple #2
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="RuleSetProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal RuleSetProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json);
            { _profileName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("profileName"), out var __jsonProfileName) ? (string)__jsonProfileName : (string)ProfileName; }
            AfterFromJson(json);
        }
Exemple #3
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="UserManagedHttpsParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal UserManagedHttpsParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __customDomainHttpsParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters(json);
            { _certificateSourceParameter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("certificateSourceParameters"), out var __jsonCertificateSourceParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultCertificateSourceParameters.FromJson(__jsonCertificateSourceParameters) : CertificateSourceParameter; }
            AfterFromJson(json);
        }
Exemple #4
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="DeliveryRuleHttpVersionCondition" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DeliveryRuleHttpVersionCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json);
            { _parameter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpVersionMatchConditionParameters.FromJson(__jsonParameters) : Parameter; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="AfdDomain" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AfdDomain(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json);
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainProperties.FromJson(__jsonProperties) : Property; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="KeyVaultCertificateSourceParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal KeyVaultCertificateSourceParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _typeName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName; }
            { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; }
            { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; }
            { _vaultName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("vaultName"), out var __jsonVaultName) ? (string)__jsonVaultName : (string)VaultName; }
            { _secretName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("secretName"), out var __jsonSecretName) ? (string)__jsonSecretName : (string)SecretName; }
            { _secretVersion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("secretVersion"), out var __jsonSecretVersion) ? (string)__jsonSecretVersion : (string)SecretVersion; }
            { _updateRule = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("updateRule"), out var __jsonUpdateRule) ? (string)__jsonUpdateRule : (string)UpdateRule; }
            { _deleteRule = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("deleteRule"), out var __jsonDeleteRule) ? (string)__jsonDeleteRule : (string)DeleteRule; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="CustomerCertificateParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CustomerCertificateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __secretParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters(json);
            { _secretSource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("secretSource"), out var __jsonSecretSource) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonSecretSource) : SecretSource; }
            { _secretVersion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("secretVersion"), out var __jsonSecretVersion) ? (string)__jsonSecretVersion : (string)SecretVersion; }
            { _useLatestVersion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("useLatestVersion"), out var __jsonUseLatestVersion) ? (bool?)__jsonUseLatestVersion : UseLatestVersion; }
            { _subject = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("subject"), out var __jsonSubject) ? (string)__jsonSubject : (string)Subject; }
            { _expirationDate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("expirationDate"), out var __jsonExpirationDate) ? (string)__jsonExpirationDate : (string)ExpirationDate; }
            { _certificateAuthority = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("certificateAuthority"), out var __jsonCertificateAuthority) ? (string)__jsonCertificateAuthority : (string)CertificateAuthority; }
            { _subjectAlternativeName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("subjectAlternativeNames"), out var __jsonSubjectAlternativeNames) ? If(__jsonSubjectAlternativeNames as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : SubjectAlternativeName; }
            { _thumbprint = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("thumbprint"), out var __jsonThumbprint) ? (string)__jsonThumbprint : (string)Thumbprint; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="UrlRedirectActionParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal UrlRedirectActionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _typeName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName; }
            { _redirectType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("redirectType"), out var __jsonRedirectType) ? (string)__jsonRedirectType : (string)RedirectType; }
            { _destinationProtocol = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("destinationProtocol"), out var __jsonDestinationProtocol) ? (string)__jsonDestinationProtocol : (string)DestinationProtocol; }
            { _customPath = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("customPath"), out var __jsonCustomPath) ? (string)__jsonCustomPath : (string)CustomPath; }
            { _customHostname = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("customHostname"), out var __jsonCustomHostname) ? (string)__jsonCustomHostname : (string)CustomHostname; }
            { _customQueryString = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("customQueryString"), out var __jsonCustomQueryString) ? (string)__jsonCustomQueryString : (string)CustomQueryString; }
            { _customFragment = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("customFragment"), out var __jsonCustomFragment) ? (string)__jsonCustomFragment : (string)CustomFragment; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="CustomDomainProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CustomDomainProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _hostName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName; }
            { _resourceState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState; }
            { _customHttpsProvisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("customHttpsProvisioningState"), out var __jsonCustomHttpsProvisioningState) ? (string)__jsonCustomHttpsProvisioningState : (string)CustomHttpsProvisioningState; }
            { _customHttpsProvisioningSubstate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("customHttpsProvisioningSubstate"), out var __jsonCustomHttpsProvisioningSubstate) ? (string)__jsonCustomHttpsProvisioningSubstate : (string)CustomHttpsProvisioningSubstate; }
            { _customHttpsParameter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("customHttpsParameters"), out var __jsonCustomHttpsParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters.FromJson(__jsonCustomHttpsParameters) : CustomHttpsParameter; }
            { _validationData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("validationData"), out var __jsonValidationData) ? (string)__jsonValidationData : (string)ValidationData; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            AfterFromJson(json);
        }
Exemple #10
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="CookiesMatchConditionParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CookiesMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _typeName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName; }
            { _selector = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("selector"), out var __jsonSelector) ? (string)__jsonSelector : (string)Selector; }
            { _operator = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator; }
            { _negateCondition = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition; }
            { _matchValue = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("matchValues"), out var __jsonMatchValues) ? If(__jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : MatchValue; }
            { _transform = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("transforms"), out var __jsonTransforms) ? If(__jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) "")))))() : null : Transform; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="SystemData" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _createdBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy; }
            { _createdByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType; }
            { _createdAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt; }
            { _lastModifiedBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy; }
            { _lastModifiedByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType; }
            { _lastModifiedAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="EndpointProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal EndpointProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __endpointPropertiesUpdateParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParameters(json);
            { _hostName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName; }
            { _origin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("origins"), out var __jsonOrigins) ? If(__jsonOrigins as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin)(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOrigin.FromJson(__u)))))() : null : Origin; }
            { _originGroup = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("originGroups"), out var __jsonOriginGroups) ? If(__jsonOriginGroups as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup)(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroup.FromJson(__p)))))() : null : OriginGroup; }
            { _customDomain = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("customDomains"), out var __jsonCustomDomains) ? If(__jsonCustomDomains as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __l) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain)(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomain.FromJson(__k)))))() : null : CustomDomain; }
            { _resourceState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            AfterFromJson(json);
        }
Exemple #13
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="CdnIdentity" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CdnIdentity(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; }
            { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; }
            { _profileName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("profileName"), out var __jsonProfileName) ? (string)__jsonProfileName : (string)ProfileName; }
            { _customDomainName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("customDomainName"), out var __jsonCustomDomainName) ? (string)__jsonCustomDomainName : (string)CustomDomainName; }
            { _endpointName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("endpointName"), out var __jsonEndpointName) ? (string)__jsonEndpointName : (string)EndpointName; }
            { _originGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("originGroupName"), out var __jsonOriginGroupName) ? (string)__jsonOriginGroupName : (string)OriginGroupName; }
            { _originName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("originName"), out var __jsonOriginName) ? (string)__jsonOriginName : (string)OriginName; }
            { _routeName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("routeName"), out var __jsonRouteName) ? (string)__jsonRouteName : (string)RouteName; }
            { _ruleSetName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("ruleSetName"), out var __jsonRuleSetName) ? (string)__jsonRuleSetName : (string)RuleSetName; }
            { _ruleName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("ruleName"), out var __jsonRuleName) ? (string)__jsonRuleName : (string)RuleName; }
            { _securityPolicyName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("securityPolicyName"), out var __jsonSecurityPolicyName) ? (string)__jsonSecurityPolicyName : (string)SecurityPolicyName; }
            { _secretName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("secretName"), out var __jsonSecretName) ? (string)__jsonSecretName : (string)SecretName; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="EndpointPropertiesUpdateParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal EndpointPropertiesUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _defaultOriginGroup = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("defaultOriginGroup"), out var __jsonDefaultOriginGroup) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonDefaultOriginGroup) : DefaultOriginGroup; }
            { _deliveryPolicy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("deliveryPolicy"), out var __jsonDeliveryPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicy.FromJson(__jsonDeliveryPolicy) : DeliveryPolicy; }
            { _webApplicationFirewallPolicyLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("webApplicationFirewallPolicyLink"), out var __jsonWebApplicationFirewallPolicyLink) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.FromJson(__jsonWebApplicationFirewallPolicyLink) : WebApplicationFirewallPolicyLink; }
            { _originPath = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("originPath"), out var __jsonOriginPath) ? (string)__jsonOriginPath : (string)OriginPath; }
            { _contentTypesToCompress = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("contentTypesToCompress"), out var __jsonContentTypesToCompress) ? If(__jsonContentTypesToCompress as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : ContentTypesToCompress; }
            { _originHostHeader = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("originHostHeader"), out var __jsonOriginHostHeader) ? (string)__jsonOriginHostHeader : (string)OriginHostHeader; }
            { _isCompressionEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("isCompressionEnabled"), out var __jsonIsCompressionEnabled) ? (bool?)__jsonIsCompressionEnabled : IsCompressionEnabled; }
            { _isHttpAllowed = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("isHttpAllowed"), out var __jsonIsHttpAllowed) ? (bool?)__jsonIsHttpAllowed : IsHttpAllowed; }
            { _isHttpsAllowed = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("isHttpsAllowed"), out var __jsonIsHttpsAllowed) ? (bool?)__jsonIsHttpsAllowed : IsHttpsAllowed; }
            { _queryStringCachingBehavior = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("queryStringCachingBehavior"), out var __jsonQueryStringCachingBehavior) ? (string)__jsonQueryStringCachingBehavior : (string)QueryStringCachingBehavior; }
            { _optimizationType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("optimizationType"), out var __jsonOptimizationType) ? (string)__jsonOptimizationType : (string)OptimizationType; }
            { _probePath = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("probePath"), out var __jsonProbePath) ? (string)__jsonProbePath : (string)ProbePath; }
            { _geoFilter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("geoFilters"), out var __jsonGeoFilters) ? If(__jsonGeoFilters as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter)(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilter.FromJson(__p)))))() : null : GeoFilter; }
            { _urlSigningKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("urlSigningKeys"), out var __jsonUrlSigningKeys) ? If(__jsonUrlSigningKeys as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __l) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey)(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKey.FromJson(__k)))))() : null : UrlSigningKey; }
            AfterFromJson(json);
        }
Exemple #15
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="AfdOriginUpdatePropertiesParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AfdOriginUpdatePropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _azureOrigin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("azureOrigin"), out var __jsonAzureOrigin) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonAzureOrigin) : AzureOrigin; }
            { _sharedPrivateLinkResource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("sharedPrivateLinkResource"), out var __jsonSharedPrivateLinkResource) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourceProperties.FromJson(__jsonSharedPrivateLinkResource) : SharedPrivateLinkResource; }
            { _originGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("originGroupName"), out var __jsonOriginGroupName) ? (string)__jsonOriginGroupName : (string)OriginGroupName; }
            { _hostName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName; }
            { _httpPort = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber>("httpPort"), out var __jsonHttpPort) ? (int?)__jsonHttpPort : HttpPort; }
            { _httpsPort = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber>("httpsPort"), out var __jsonHttpsPort) ? (int?)__jsonHttpsPort : HttpsPort; }
            { _originHostHeader = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("originHostHeader"), out var __jsonOriginHostHeader) ? (string)__jsonOriginHostHeader : (string)OriginHostHeader; }
            { _priority = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber>("priority"), out var __jsonPriority) ? (int?)__jsonPriority : Priority; }
            { _weight = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber>("weight"), out var __jsonWeight) ? (int?)__jsonWeight : Weight; }
            { _enabledState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("enabledState"), out var __jsonEnabledState) ? (string)__jsonEnabledState : (string)EnabledState; }
            { _enforceCertificateNameCheck = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("enforceCertificateNameCheck"), out var __jsonEnforceCertificateNameCheck) ? (bool?)__jsonEnforceCertificateNameCheck : EnforceCertificateNameCheck; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="DeepCreatedOriginProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DeepCreatedOriginProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _hostName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName; }
            { _httpPort = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber>("httpPort"), out var __jsonHttpPort) ? (int?)__jsonHttpPort : HttpPort; }
            { _httpsPort = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber>("httpsPort"), out var __jsonHttpsPort) ? (int?)__jsonHttpsPort : HttpsPort; }
            { _originHostHeader = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("originHostHeader"), out var __jsonOriginHostHeader) ? (string)__jsonOriginHostHeader : (string)OriginHostHeader; }
            { _priority = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber>("priority"), out var __jsonPriority) ? (int?)__jsonPriority : Priority; }
            { _weight = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber>("weight"), out var __jsonWeight) ? (int?)__jsonWeight : Weight; }
            { _enabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : Enabled; }
            { _privateLinkAlias = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("privateLinkAlias"), out var __jsonPrivateLinkAlias) ? (string)__jsonPrivateLinkAlias : (string)PrivateLinkAlias; }
            { _privateLinkResourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("privateLinkResourceId"), out var __jsonPrivateLinkResourceId) ? (string)__jsonPrivateLinkResourceId : (string)PrivateLinkResourceId; }
            { _privateLinkLocation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("privateLinkLocation"), out var __jsonPrivateLinkLocation) ? (string)__jsonPrivateLinkLocation : (string)PrivateLinkLocation; }
            { _privateLinkApprovalMessage = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("privateLinkApprovalMessage"), out var __jsonPrivateLinkApprovalMessage) ? (string)__jsonPrivateLinkApprovalMessage : (string)PrivateLinkApprovalMessage; }
            { _privateEndpointStatus = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("privateEndpointStatus"), out var __jsonPrivateEndpointStatus) ? (string)__jsonPrivateEndpointStatus : (string)PrivateEndpointStatus; }
            AfterFromJson(json);
        }
Exemple #17
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="RouteUpdatePropertiesParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal RouteUpdatePropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _originGroup = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("originGroup"), out var __jsonOriginGroup) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonOriginGroup) : OriginGroup; }
            { _cacheConfiguration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("cacheConfiguration"), out var __jsonCacheConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfiguration.FromJson(__jsonCacheConfiguration) : CacheConfiguration; }
            { _endpointName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("endpointName"), out var __jsonEndpointName) ? (string)__jsonEndpointName : (string)EndpointName; }
            { _customDomain = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("customDomains"), out var __jsonCustomDomains) ? If(__jsonCustomDomains as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference)(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReference.FromJson(__u)))))() : null : CustomDomain; }
            { _originPath = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("originPath"), out var __jsonOriginPath) ? (string)__jsonOriginPath : (string)OriginPath; }
            { _ruleSet = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("ruleSets"), out var __jsonRuleSets) ? If(__jsonRuleSets as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference)(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__p)))))() : null : RuleSet; }
            { _supportedProtocol = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("supportedProtocols"), out var __jsonSupportedProtocols) ? If(__jsonSupportedProtocols as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __l) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols)(__k is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __j ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols)(__j.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols) "")))))() : null : SupportedProtocol; }
            { _patternsToMatch = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("patternsToMatch"), out var __jsonPatternsToMatch) ? If(__jsonPatternsToMatch as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __g) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f) => (string)(__f is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null))))() : null : PatternsToMatch; }
            { _forwardingProtocol = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("forwardingProtocol"), out var __jsonForwardingProtocol) ? (string)__jsonForwardingProtocol : (string)ForwardingProtocol; }
            { _linkToDefaultDomain = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("linkToDefaultDomain"), out var __jsonLinkToDefaultDomain) ? (string)__jsonLinkToDefaultDomain : (string)LinkToDefaultDomain; }
            { _httpsRedirect = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("httpsRedirect"), out var __jsonHttpsRedirect) ? (string)__jsonHttpsRedirect : (string)HttpsRedirect; }
            { _enabledState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("enabledState"), out var __jsonEnabledState) ? (string)__jsonEnabledState : (string)EnabledState; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="MetricSpecification" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal MetricSpecification(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _displayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName; }
            { _displayDescription = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("displayDescription"), out var __jsonDisplayDescription) ? (string)__jsonDisplayDescription : (string)DisplayDescription; }
            { _unit = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit; }
            { _aggregationType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("aggregationType"), out var __jsonAggregationType) ? (string)__jsonAggregationType : (string)AggregationType; }
            { _availability = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("availabilities"), out var __jsonAvailabilities) ? If(__jsonAvailabilities as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability)(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricAvailability.FromJson(__u)))))() : null : Availability; }
            { _supportedTimeGrainType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("supportedTimeGrainTypes"), out var __jsonSupportedTimeGrainTypes) ? If(__jsonSupportedTimeGrainTypes as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (string)(__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null))))() : null : SupportedTimeGrainType; }
            { _dimension = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("dimensions"), out var __jsonDimensions) ? If(__jsonDimensions as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __l) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k) => (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties)(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DimensionProperties.FromJson(__k)))))() : null : Dimension; }
            { _fillGapWithZero = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("fillGapWithZero"), out var __jsonFillGapWithZero) ? (bool?)__jsonFillGapWithZero : FillGapWithZero; }
            { _metricFilterPattern = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("metricFilterPattern"), out var __jsonMetricFilterPattern) ? (string)__jsonMetricFilterPattern : (string)MetricFilterPattern; }
            { _isInternal = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("isInternal"), out var __jsonIsInternal) ? (bool?)__jsonIsInternal : IsInternal; }
            AfterFromJson(json);
        }