/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="DatabaseProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal DatabaseProperties(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _charset = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("charset"), out var __jsonCharset) ? (string)__jsonCharset : (string)Charset; } { _collation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("collation"), out var __jsonCollation) ? (string)__jsonCollation : (string)Collation; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="PerformanceTierProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal PerformanceTierProperties(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _serviceLevelObjective = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonArray>("serviceLevelObjectives"), out var __jsonServiceLevelObjectives) ? If(__jsonServiceLevelObjectives as Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IPerformanceTierServiceLevelObjectives[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.IPerformanceTierServiceLevelObjectives)(Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20171201.PerformanceTierServiceLevelObjectives.FromJson(__u)))))() : null : ServiceLevelObjective; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="ServerRestartParameter" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal ServerRestartParameter(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _restartWithFailover = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("restartWithFailover"), out var __jsonRestartWithFailover) ? (string)__jsonRestartWithFailover : (string)RestartWithFailover; } { _maxFailoverSecond = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNumber>("maxFailoverSeconds"), out var __jsonMaxFailoverSeconds) ? (int?)__jsonMaxFailoverSeconds : MaxFailoverSecond; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="CapabilityProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal CapabilityProperties(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _zone = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("zone"), out var __jsonZone) ? (string)__jsonZone : (string)Zone; } { _supportedFlexibleServerEdition = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonArray>("supportedFlexibleServerEditions"), out var __jsonSupportedFlexibleServerEditions) ? If(__jsonSupportedFlexibleServerEditions as Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerEditionCapability[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.IServerEditionCapability)(Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20200701Preview.ServerEditionCapability.FromJson(__u)))))() : null : SupportedFlexibleServerEdition; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="StorageMbCapability" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal StorageMbCapability(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _storageSizeMb = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNumber>("storageSizeMB"), out var __jsonStorageSizeMb) ? (long?)__jsonStorageSizeMb : StorageSizeMb; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="TrackedResource" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.Resource(json); { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api10.TrackedResourceTags.FromJson(__jsonTags) : Tag; } { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="Backup" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal Backup(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _retentionDay = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonNumber>("backupRetentionDays"), out var __jsonBackupRetentionDays) ? (int?)__jsonBackupRetentionDays : RetentionDay; } { _geoRedundantBackup = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("geoRedundantBackup"), out var __jsonGeoRedundantBackup) ? (string)__jsonGeoRedundantBackup : (string)GeoRedundantBackup; } { _earliestRestoreDate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("earliestRestoreDate"), out var __jsonEarliestRestoreDate) ? global::System.DateTime.TryParse((string)__jsonEarliestRestoreDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEarliestRestoreDateValue) ? __jsonEarliestRestoreDateValue : EarliestRestoreDate : EarliestRestoreDate; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="HighAvailability" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal HighAvailability(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _mode = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("mode"), out var __jsonMode) ? (string)__jsonMode : (string)Mode; } { _state = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("state"), out var __jsonState) ? (string)__jsonState : (string)State; } { _standbyAvailabilityZone = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("standbyAvailabilityZone"), out var __jsonStandbyAvailabilityZone) ? (string)__jsonStandbyAvailabilityZone : (string)StandbyAvailabilityZone; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="Network" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal Network(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _publicNetworkAccess = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)PublicNetworkAccess; } { _delegatedSubnetResourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("delegatedSubnetResourceId"), out var __jsonDelegatedSubnetResourceId) ? (string)__jsonDelegatedSubnetResourceId : (string)DelegatedSubnetResourceId; } { _privateDnsZoneResourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("privateDnsZoneResourceId"), out var __jsonPrivateDnsZoneResourceId) ? (string)__jsonPrivateDnsZoneResourceId : (string)PrivateDnsZoneResourceId; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject into a new instance of <see cref="ServerKeyProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject instance to deserialize from.</param> internal ServerKeyProperties(Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _serverKeyType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("serverKeyType"), out var __jsonServerKeyType) ? (string)__jsonServerKeyType : (string)ServerKeyType; } { _uri = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.Runtime.Json.JsonString>("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri; } { _creationDate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.MySql.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; } AfterFromJson(json); }