/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonObject into a new instance of <see cref="CopyOnExpiryOption" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonObject instance to deserialize from.</param> internal CopyOnExpiryOption(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __copyOption = new Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20220401.CopyOption(json); AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonObject into a new instance of <see cref="CustomCopyOption" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonObject instance to deserialize from.</param> internal CustomCopyOption(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __copyOption = new Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20220401.CopyOption(json); { _duration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonString>("duration"), out var __jsonDuration) ? (string)__jsonDuration : (string)Duration; } AfterFromJson(json); }