/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="ManagedCertificate" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param> internal ManagedCertificate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __certificate = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate(json); AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of <see cref="CustomerCertificate" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from.</param> internal CustomerCertificate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __certificate = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate(json); { _secretSource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject>("secretSource"), out var __jsonSecretSource) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonSecretSource) : SecretSource; } { _secretVersion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("secretVersion"), out var __jsonSecretVersion) ? (string)__jsonSecretVersion : (string)SecretVersion; } { _certificateAuthority = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("certificateAuthority"), out var __jsonCertificateAuthority) ? (string)__jsonCertificateAuthority : (string)CertificateAuthority; } { _useLatestVersion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean>("useLatestVersion"), out var __jsonUseLatestVersion) ? (bool?)__jsonUseLatestVersion : UseLatestVersion; } { _subjectAlternativeName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray>("subjectAlternativeNames"), out var __jsonSubjectAlternativeNames) ? If(__jsonSubjectAlternativeNames as Microsoft.Azure.PowerShell.Cmdlets.Cdn.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.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : SubjectAlternativeName; } { _thumbprint = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString>("thumbprint"), out var __jsonThumbprint) ? (string)__jsonThumbprint : (string)Thumbprint; } AfterFromJson(json); }