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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubDataSourceProperties(json);
            { _consumerGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString>("consumerGroupName"), out var __jsonConsumerGroupName) ? (string)__jsonConsumerGroupName : (string)ConsumerGroupName; }
            AfterFromJson(json);
        }
Example #2
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of <see cref="EventHubOutputDataSourceProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal EventHubOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubDataSourceProperties(json);
            { _partitionKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString>("partitionKey"), out var __jsonPartitionKey) ? (string)__jsonPartitionKey : (string)PartitionKey; }
            { _propertyColumn = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray>("propertyColumns"), out var __jsonPropertyColumns) ? If(__jsonPropertyColumns as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.StreamAnalytics.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : PropertyColumn; }
            AfterFromJson(json);
        }