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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; }
            { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ComponentPurgeBody" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ComponentPurgeBody(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _table = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("table"), out var __jsonTable) ? (string)__jsonTable : (string)Table; }
            { _filter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray>("filters"), out var __jsonFilters) ? If(__jsonFilters as Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IComponentPurgeBodyFilters[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IComponentPurgeBodyFilters)(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.ComponentPurgeBodyFilters.FromJson(__u)))))() : null : Filter; }
            AfterFromJson(json);
        }
Exemple #3
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="OperationAutoGenerated" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.OperationDisplay.FromJson(__jsonDisplay) : Display; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="WebTestListResult" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal WebTestListResult(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IWebTest[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IWebTest)(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.WebTest.FromJson(__u)))))() : null : Value; }
            { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; }
            AfterFromJson(json);
        }
Exemple #5
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApplicationInsightsComponentBillingFeatures" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApplicationInsightsComponentBillingFeatures(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _dataVolumeCap = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("DataVolumeCap"), out var __jsonDataVolumeCap) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.ApplicationInsightsComponentDataVolumeCap.FromJson(__jsonDataVolumeCap) : DataVolumeCap; }
            { _currentBillingFeature = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray>("CurrentBillingFeatures"), out var __jsonCurrentBillingFeatures) ? If(__jsonCurrentBillingFeatures as Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.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.ApplicationInsights.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : CurrentBillingFeature; }
            AfterFromJson(json);
        }
Exemple #6
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ComponentLinkedStorageAccounts" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ComponentLinkedStorageAccounts(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("key"), out var __jsonKey) ? (string)__jsonKey : (string)Name; }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value; }
            AfterFromJson(json);
        }
Exemple #8
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="WebTest" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal WebTest(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __webtestsResource = new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.WebtestsResource(json);
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.WebTestProperties.FromJson(__jsonProperties) : Property; }
            { _kind = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApplicationInsightsComponentQuotaStatus" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApplicationInsightsComponentQuotaStatus(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _appId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("AppId"), out var __jsonAppId) ? (string)__jsonAppId : (string)AppId; }
            { _shouldBeThrottled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("ShouldBeThrottled"), out var __jsonShouldBeThrottled) ? (bool?)__jsonShouldBeThrottled : ShouldBeThrottled; }
            { _expirationTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("ExpirationTime"), out var __jsonExpirationTime) ? (string)__jsonExpirationTime : (string)ExpirationTime; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="WebTestPropertiesValidationRulesContentValidation"
        /// />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal WebTestPropertiesValidationRulesContentValidation(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _contentMatch = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("ContentMatch"), out var __jsonContentMatch) ? (string)__jsonContentMatch : (string)ContentMatch; }
            { _ignoreCase = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("IgnoreCase"), out var __jsonIgnoreCase) ? (bool?)__jsonIgnoreCase : IgnoreCase; }
            { _passIfTextFound = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("PassIfTextFound"), out var __jsonPassIfTextFound) ? (bool?)__jsonPassIfTextFound : PassIfTextFound; }
            AfterFromJson(json);
        }
Exemple #11
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="Resource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Resource(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="AnnotationError" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AnnotationError(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _innererror = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("innererror"), out var __jsonInnererror) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.InnerError.FromJson(__jsonInnererror) : Innererror; }
            { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; }
            { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; }
            AfterFromJson(json);
        }
Exemple #13
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="OperationDisplay" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _provider = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider; }
            { _resource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource; }
            { _operation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation; }
            AfterFromJson(json);
        }
Exemple #14
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApiKeyRequest" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApiKeyRequest(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _linkedReadProperty = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray>("linkedReadProperties"), out var __jsonLinkedReadProperties) ? If(__jsonLinkedReadProperties as Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.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.ApplicationInsights.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : LinkedReadProperty; }
            { _linkedWriteProperty = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray>("linkedWriteProperties"), out var __jsonLinkedWriteProperties) ? If(__jsonLinkedWriteProperties as Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.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.ApplicationInsights.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null))))() : null : LinkedWriteProperty; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApplicationInsightsComponent" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApplicationInsightsComponent(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __componentsResource = new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.ComponentsResource(json);
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.ApplicationInsightsComponentProperties.FromJson(__jsonProperties) : Property; }
            { _kind = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind; }
            { _etag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)Etag; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="Operation" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Operation(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.OperationInfo.FromJson(__jsonDisplay) : Display; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _origin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin; }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Any.FromJson(__jsonProperties) : Property; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ComponentPurgeBodyFilters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ComponentPurgeBodyFilters(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _column = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("column"), out var __jsonColumn) ? (string)__jsonColumn : (string)Column; }
            { _operator = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator; }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("value"), out var __jsonValue) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Any.FromJson(__jsonValue) : Value; }
            { _key = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("key"), out var __jsonKey) ? (string)__jsonKey : (string)Key; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApplicationInsightsIdentity" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApplicationInsightsIdentity(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; }
            { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; }
            { _webTestName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("webTestName"), out var __jsonWebTestName) ? (string)__jsonWebTestName : (string)WebTestName; }
            { _componentName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("componentName"), out var __jsonComponentName) ? (string)__jsonComponentName : (string)ComponentName; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            AfterFromJson(json);
        }
Exemple #19
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="WebTestPropertiesValidationRules" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal WebTestPropertiesValidationRules(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _contentValidation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("ContentValidation"), out var __jsonContentValidation) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.WebTestPropertiesValidationRulesContentValidation.FromJson(__jsonContentValidation) : ContentValidation; }
            { _sslCheck = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("SSLCheck"), out var __jsonSslCheck) ? (bool?)__jsonSslCheck : SslCheck; }
            { _sslCertRemainingLifetimeCheck = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("SSLCertRemainingLifetimeCheck"), out var __jsonSslCertRemainingLifetimeCheck) ? (int?)__jsonSslCertRemainingLifetimeCheck : SslCertRemainingLifetimeCheck; }
            { _expectedHttpStatusCode = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("ExpectedHttpStatusCode"), out var __jsonExpectedHttpStatusCode) ? (int?)__jsonExpectedHttpStatusCode : ExpectedHttpStatusCode; }
            { _ignoreHttpsStatusCode = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("IgnoreHttpsStatusCode"), out var __jsonIgnoreHttpsStatusCode) ? (bool?)__jsonIgnoreHttpsStatusCode : IgnoreHttpsStatusCode; }
            AfterFromJson(json);
        }
Exemple #20
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ComponentsResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ComponentsResource(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.ComponentsResourceTags.FromJson(__jsonTags) : Tag; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="Annotation" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Annotation(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("AnnotationName"), out var __jsonAnnotationName) ? (string)__jsonAnnotationName : (string)Name; }
            { _category = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Category"), out var __jsonCategory) ? (string)__jsonCategory : (string)Category; }
            { _eventTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("EventTime"), out var __jsonEventTime) ? global::System.DateTime.TryParse((string)__jsonEventTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEventTimeValue) ? __jsonEventTimeValue : EventTime : EventTime; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Properties"), out var __jsonProperties) ? (string)__jsonProperties : (string)Property; }
            { _relatedAnnotation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("RelatedAnnotation"), out var __jsonRelatedAnnotation) ? (string)__jsonRelatedAnnotation : (string)RelatedAnnotation; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApplicationInsightsComponentFeatureCapability"
        /// />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApplicationInsightsComponentFeatureCapability(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Value"), out var __jsonValue) ? (string)__jsonValue : (string)Value; }
            { _unit = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit; }
            { _meterId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("MeterId"), out var __jsonMeterId) ? (string)__jsonMeterId : (string)MeterId; }
            { _meterRateFrequency = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("MeterRateFrequency"), out var __jsonMeterRateFrequency) ? (string)__jsonMeterRateFrequency : (string)MeterRateFrequency; }
            AfterFromJson(json);
        }
Exemple #23
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApplicationInsightsComponentDataVolumeCap" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApplicationInsightsComponentDataVolumeCap(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _cap = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("Cap"), out var __jsonCap) ? (float?)__jsonCap : Cap; }
            { _resetTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("ResetTime"), out var __jsonResetTime) ? (int?)__jsonResetTime : ResetTime; }
            { _warningThreshold = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("WarningThreshold"), out var __jsonWarningThreshold) ? (int?)__jsonWarningThreshold : WarningThreshold; }
            { _stopSendNotificationWhenHitThreshold = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("StopSendNotificationWhenHitThreshold"), out var __jsonStopSendNotificationWhenHitThreshold) ? (bool?)__jsonStopSendNotificationWhenHitThreshold : StopSendNotificationWhenHitThreshold; }
            { _stopSendNotificationWhenHitCap = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("StopSendNotificationWhenHitCap"), out var __jsonStopSendNotificationWhenHitCap) ? (bool?)__jsonStopSendNotificationWhenHitCap : StopSendNotificationWhenHitCap; }
            { _maxHistoryCap = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("MaxHistoryCap"), out var __jsonMaxHistoryCap) ? (float?)__jsonMaxHistoryCap : MaxHistoryCap; }
            AfterFromJson(json);
        }
Exemple #24
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="WebTestPropertiesRequest" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal WebTestPropertiesRequest(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _requestUrl = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("RequestUrl"), out var __jsonRequestUrl) ? (string)__jsonRequestUrl : (string)RequestUrl; }
            { _header = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray>("Headers"), out var __jsonHeaders) ? If(__jsonHeaders as Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IHeaderField[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IHeaderField)(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.HeaderField.FromJson(__u)))))() : null : Header; }
            { _httpVerb = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("HttpVerb"), out var __jsonHttpVerb) ? (string)__jsonHttpVerb : (string)HttpVerb; }
            { _requestBody = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("RequestBody"), out var __jsonRequestBody) ? (string)__jsonRequestBody : (string)RequestBody; }
            { _parseDependentRequest = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("ParseDependentRequests"), out var __jsonParseDependentRequests) ? (bool?)__jsonParseDependentRequests : ParseDependentRequest; }
            { _followRedirect = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("FollowRedirects"), out var __jsonFollowRedirects) ? (bool?)__jsonFollowRedirects : FollowRedirect; }
            AfterFromJson(json);
        }
Exemple #25
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApplicationInsightsComponentExportRequest" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApplicationInsightsComponentExportRequest(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _recordType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("RecordTypes"), out var __jsonRecordTypes) ? (string)__jsonRecordTypes : (string)RecordType; }
            { _destinationType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("DestinationType"), out var __jsonDestinationType) ? (string)__jsonDestinationType : (string)DestinationType; }
            { _destinationAddress = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("DestinationAddress"), out var __jsonDestinationAddress) ? (string)__jsonDestinationAddress : (string)DestinationAddress; }
            { _isEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("IsEnabled"), out var __jsonIsEnabled) ? (string)__jsonIsEnabled : (string)IsEnabled; }
            { _notificationQueueEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("NotificationQueueEnabled"), out var __jsonNotificationQueueEnabled) ? (string)__jsonNotificationQueueEnabled : (string)NotificationQueueEnabled; }
            { _notificationQueueUri = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("NotificationQueueUri"), out var __jsonNotificationQueueUri) ? (string)__jsonNotificationQueueUri : (string)NotificationQueueUri; }
            { _destinationStorageSubscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("DestinationStorageSubscriptionId"), out var __jsonDestinationStorageSubscriptionId) ? (string)__jsonDestinationStorageSubscriptionId : (string)DestinationStorageSubscriptionId; }
            { _destinationStorageLocationId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("DestinationStorageLocationId"), out var __jsonDestinationStorageLocationId) ? (string)__jsonDestinationStorageLocationId : (string)DestinationStorageLocationId; }
            { _destinationAccountId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("DestinationAccountId"), out var __jsonDestinationAccountId) ? (string)__jsonDestinationAccountId : (string)DestinationAccountId; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApplicationInsightsComponentFeature" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApplicationInsightsComponentFeature(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _featureName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("FeatureName"), out var __jsonFeatureName) ? (string)__jsonFeatureName : (string)FeatureName; }
            { _meterId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("MeterId"), out var __jsonMeterId) ? (string)__jsonMeterId : (string)MeterId; }
            { _meterRateFrequency = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("MeterRateFrequency"), out var __jsonMeterRateFrequency) ? (string)__jsonMeterRateFrequency : (string)MeterRateFrequency; }
            { _resouceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("ResouceId"), out var __jsonResouceId) ? (string)__jsonResouceId : (string)ResouceId; }
            { _isHidden = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("IsHidden"), out var __jsonIsHidden) ? (bool?)__jsonIsHidden : IsHidden; }
            { _capability = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray>("Capabilities"), out var __jsonCapabilities) ? If(__jsonCapabilities as Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentFeatureCapability[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentFeatureCapability)(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.ApplicationInsightsComponentFeatureCapability.FromJson(__u)))))() : null : Capability; }
            { _title = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title; }
            { _isMainFeature = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("IsMainFeature"), out var __jsonIsMainFeature) ? (bool?)__jsonIsMainFeature : IsMainFeature; }
            { _supportedAddonFeature = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("SupportedAddonFeatures"), out var __jsonSupportedAddonFeatures) ? (string)__jsonSupportedAddonFeatures : (string)SupportedAddonFeature; }
            AfterFromJson(json);
        }
Exemple #27
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="ApplicationInsightsComponentProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ApplicationInsightsComponentProperties(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _applicationId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("ApplicationId"), out var __jsonApplicationId) ? (string)__jsonApplicationId : (string)ApplicationId; }
            { _appId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("AppId"), out var __jsonAppId) ? (string)__jsonAppId : (string)AppId; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _applicationType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Application_Type"), out var __jsonApplicationType) ? (string)__jsonApplicationType : (string)ApplicationType; }
            { _flowType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Flow_Type"), out var __jsonFlowType) ? (string)__jsonFlowType : (string)FlowType; }
            { _requestSource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Request_Source"), out var __jsonRequestSource) ? (string)__jsonRequestSource : (string)RequestSource; }
            { _instrumentationKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("InstrumentationKey"), out var __jsonInstrumentationKey) ? (string)__jsonInstrumentationKey : (string)InstrumentationKey; }
            { _creationDate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("CreationDate"), out var __jsonCreationDate) ? global::System.DateTime.TryParse((string)__jsonCreationDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreationDateValue) ? __jsonCreationDateValue : CreationDate : CreationDate; }
            { _tenantId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("TenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId; }
            { _hockeyAppId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("HockeyAppId"), out var __jsonHockeyAppId) ? (string)__jsonHockeyAppId : (string)HockeyAppId; }
            { _hockeyAppToken = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("HockeyAppToken"), out var __jsonHockeyAppToken) ? (string)__jsonHockeyAppToken : (string)HockeyAppToken; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _samplingPercentage = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("SamplingPercentage"), out var __jsonSamplingPercentage) ? (double?)__jsonSamplingPercentage : SamplingPercentage; }
            { _connectionString = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("ConnectionString"), out var __jsonConnectionString) ? (string)__jsonConnectionString : (string)ConnectionString; }
            { _retentionInDay = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("RetentionInDays"), out var __jsonRetentionInDays) ? (int?)__jsonRetentionInDays : RetentionInDay; }
            { _disableIPMasking = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("DisableIpMasking"), out var __jsonDisableIPMasking) ? (bool?)__jsonDisableIPMasking : DisableIPMasking; }
            { _immediatePurgeDataOn30Day = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("ImmediatePurgeDataOn30Days"), out var __jsonImmediatePurgeDataOn30Days) ? (bool?)__jsonImmediatePurgeDataOn30Days : ImmediatePurgeDataOn30Day; }
            { _workspaceResourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("WorkspaceResourceId"), out var __jsonWorkspaceResourceId) ? (string)__jsonWorkspaceResourceId : (string)WorkspaceResourceId; }
            { _laMigrationDate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("LaMigrationDate"), out var __jsonLaMigrationDate) ? global::System.DateTime.TryParse((string)__jsonLaMigrationDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLaMigrationDateValue) ? __jsonLaMigrationDateValue : LaMigrationDate : LaMigrationDate; }
            { _privateLinkScopedResource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray>("PrivateLinkScopedResources"), out var __jsonPrivateLinkScopedResources) ? If(__jsonPrivateLinkScopedResources as Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IPrivateLinkScopedResource[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IPrivateLinkScopedResource)(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.PrivateLinkScopedResource.FromJson(__u)))))() : null : PrivateLinkScopedResource; }
            { _publicNetworkAccessForIngestion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("publicNetworkAccessForIngestion"), out var __jsonPublicNetworkAccessForIngestion) ? (string)__jsonPublicNetworkAccessForIngestion : (string)PublicNetworkAccessForIngestion; }
            { _publicNetworkAccessForQuery = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("publicNetworkAccessForQuery"), out var __jsonPublicNetworkAccessForQuery) ? (string)__jsonPublicNetworkAccessForQuery : (string)PublicNetworkAccessForQuery; }
            { _ingestionMode = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("IngestionMode"), out var __jsonIngestionMode) ? (string)__jsonIngestionMode : (string)IngestionMode; }
            { _disableLocalAuth = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("DisableLocalAuth"), out var __jsonDisableLocalAuth) ? (bool?)__jsonDisableLocalAuth : DisableLocalAuth; }
            { _forceCustomerStorageForProfiler = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("ForceCustomerStorageForProfiler"), out var __jsonForceCustomerStorageForProfiler) ? (bool?)__jsonForceCustomerStorageForProfiler : ForceCustomerStorageForProfiler; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject into a new instance of <see cref="WebTestProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal WebTestProperties(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _configuration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("Configuration"), out var __jsonConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.WebTestPropertiesConfiguration.FromJson(__jsonConfiguration) : Configuration; }
            { _request = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("Request"), out var __jsonRequest) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.WebTestPropertiesRequest.FromJson(__jsonRequest) : Request; }
            { _validationRule = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject>("ValidationRules"), out var __jsonValidationRules) ? Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.WebTestPropertiesValidationRules.FromJson(__jsonValidationRules) : ValidationRule; }
            { _syntheticMonitorId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("SyntheticMonitorId"), out var __jsonSyntheticMonitorId) ? (string)__jsonSyntheticMonitorId : (string)SyntheticMonitorId; }
            { _webTestName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Name"), out var __jsonName) ? (string)__jsonName : (string)WebTestName; }
            { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; }
            { _enabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("Enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : Enabled; }
            { _frequency = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("Frequency"), out var __jsonFrequency) ? (int?)__jsonFrequency : Frequency; }
            { _timeout = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNumber>("Timeout"), out var __jsonTimeout) ? (int?)__jsonTimeout : Timeout; }
            { _webTestKind = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("Kind"), out var __jsonKind) ? (string)__jsonKind : (string)WebTestKind; }
            { _retryEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonBoolean>("RetryEnabled"), out var __jsonRetryEnabled) ? (bool?)__jsonRetryEnabled : RetryEnabled; }
            { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray>("Locations"), out var __jsonLocations) ? If(__jsonLocations as Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IWebTestGeolocation[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IWebTestGeolocation)(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.WebTestGeolocation.FromJson(__u)))))() : null : Location; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ApplicationInsightsComponentApiKey" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ApplicationInsightsComponentApiKey" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._apiKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString(this._apiKey.ToString()) : null, "apiKey", container.Add);
            }
            AddIf(null != (((object)this._createdDate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString(this._createdDate.ToString()) : null, "createdDate", container.Add);
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            if (null != this._linkedReadProperty)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.XNodeArray();
                foreach (var __x in this._linkedReadProperty)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("linkedReadProperties", __w);
            }
            if (null != this._linkedWriteProperty)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.XNodeArray();
                foreach (var __s in this._linkedWriteProperty)
                {
                    AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add);
                }
                container.Add("linkedWriteProperties", __r);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
        /// object before it is serialized.
        /// If you wish to disable the default serialization entirely, return <c>true</c> in the <paramref name="returnNow" /> output
        /// parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Json.JsonObject container, ref bool returnNow);