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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __serverPropertiesForCreate = new Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForCreate(json);
            { _sourceServerId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("sourceServerId"), out var __jsonSourceServerId) ? (string)__jsonSourceServerId : (string)SourceServerId; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="ServerPropertiesForRestore" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ServerPropertiesForRestore(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __serverPropertiesForCreate = new Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForCreate(json);
            { _restorePointInTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("restorePointInTime"), out var __jsonRestorePointInTime) ? global::System.DateTime.TryParse((string)__jsonRestorePointInTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRestorePointInTimeValue) ? __jsonRestorePointInTimeValue : RestorePointInTime : RestorePointInTime; }
            { _sourceServerId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("sourceServerId"), out var __jsonSourceServerId) ? (string)__jsonSourceServerId : (string)SourceServerId; }
            AfterFromJson(json);
        }
示例#3
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="ServerPropertiesForDefaultCreate" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ServerPropertiesForDefaultCreate(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __serverPropertiesForCreate = new Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.ServerPropertiesForCreate(json);
            { _administratorLogin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("administratorLogin"), out var __jsonAdministratorLogin) ? (string)__jsonAdministratorLogin : (string)AdministratorLogin; }
            { _administratorLoginPassword = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("administratorLoginPassword"), out var __jsonAdministratorLoginPassword) ? new System.Net.NetworkCredential("", (string)__jsonAdministratorLoginPassword).SecurePassword : AdministratorLoginPassword; }
            AfterFromJson(json);
        }