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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __targetServiceBase = new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.TargetServiceBase(json);
            { _endpoint = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString>("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)Endpoint; }
            AfterFromJson(json);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject into a new instance of <see cref="AzureResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AzureResource(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __targetServiceBase = new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.TargetServiceBase(json);
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _resourceProperty = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject>("resourceProperties"), out var __jsonResourceProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.AzureResourcePropertiesBase.FromJson(__jsonResourceProperties) : ResourceProperty; }
            AfterFromJson(json);
        }