/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="Any" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal Any(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="Tags" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> /// <param name="exclusions"></param> internal Tags(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet <string> exclusions = null) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.JsonSerializable.FromJson(json, ((Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.IAssociativeArray <string>) this).AdditionalProperties, null, exclusions); AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ErrorResponse" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="Tags1" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal Tags1(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.Tags.FromJson(__jsonTags) : Tag; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ResourceLocation" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal ResourceLocation(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="CheckNameAvailabilityRequest" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal CheckNameAvailabilityRequest(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ErrorAdditionalInfo" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } { _info = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject>("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Any.FromJson(__jsonInfo) : Info; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ResourceProviderOperationList" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal ResourceProviderOperationList(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.IResourceProviderOperationDefinition[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.IResourceProviderOperationDefinition)(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.ResourceProviderOperationDefinition.FromJson(__u)))))() : null : Value; } { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="CertBasedSecurityPrincipal" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal CertBasedSecurityPrincipal(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _cert = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("cert"), out var __jsonCert) ? (string)__jsonCert : (string)Cert; } { _ledgerRoleName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("ledgerRoleName"), out var __jsonLedgerRoleName) ? (string)__jsonLedgerRoleName : (string)LedgerRoleName; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ResourceProviderOperationDefinition" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal ResourceProviderOperationDefinition(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20220513.ResourceProviderOperationDisplay.FromJson(__jsonDisplay) : Display; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _isDataAction = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonBoolean>("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="CheckNameAvailabilityResponse" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal CheckNameAvailabilityResponse(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _nameAvailable = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonBoolean>("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : NameAvailable; } { _reason = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason; } { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="AadBasedSecurityPrincipal" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal AadBasedSecurityPrincipal(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _principalId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId; } { _tenantId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId; } { _ledgerRoleName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("ledgerRoleName"), out var __jsonLedgerRoleName) ? (string)__jsonLedgerRoleName : (string)LedgerRoleName; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ConfidentialLedgerIdentity" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal ConfidentialLedgerIdentity(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; } { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; } { _ledgerName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("ledgerName"), out var __jsonLedgerName) ? (string)__jsonLedgerName : (string)LedgerName; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ConfidentialLedger" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal ConfidentialLedger(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.Resource(json); __resourceLocation = new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.ResourceLocation(json); __tags1 = new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.Tags1(json); { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.LedgerProperties.FromJson(__jsonProperties) : Property; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ResourceProviderOperationDisplay" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal ResourceProviderOperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _provider = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider; } { _resource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource; } { _operation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation; } { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="Resource" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal Resource(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _systemData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject>("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ErrorDetail" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; } { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; } { _target = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target; } { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray>("details"), out var __jsonDetails) ? If(__jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20.IErrorDetail[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20.IErrorDetail)(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20.ErrorDetail.FromJson(__u)))))() : null : Detail; } { _additionalInfo = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray>("additionalInfo"), out var __jsonAdditionalInfo) ? If(__jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20.IErrorAdditionalInfo[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20.IErrorAdditionalInfo)(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20.ErrorAdditionalInfo.FromJson(__p)))))() : null : AdditionalInfo; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="SystemData" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _createdBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy; } { _createdByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType; } { _createdAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt; } { _lastModifiedBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy; } { _lastModifiedByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType; } { _lastModifiedAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="LedgerProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param> internal LedgerProperties(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _ledgerName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("ledgerName"), out var __jsonLedgerName) ? (string)__jsonLedgerName : (string)LedgerName; } { _ledgerUri = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("ledgerUri"), out var __jsonLedgerUri) ? (string)__jsonLedgerUri : (string)LedgerUri; } { _identityServiceUri = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("identityServiceUri"), out var __jsonIdentityServiceUri) ? (string)__jsonIdentityServiceUri : (string)IdentityServiceUri; } { _ledgerInternalNamespace = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("ledgerInternalNamespace"), out var __jsonLedgerInternalNamespace) ? (string)__jsonLedgerInternalNamespace : (string)LedgerInternalNamespace; } { _ledgerType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("ledgerType"), out var __jsonLedgerType) ? (string)__jsonLedgerType : (string)LedgerType; } { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; } { _aadBasedSecurityPrincipal = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray>("aadBasedSecurityPrincipals"), out var __jsonAadBasedSecurityPrincipals) ? If(__jsonAadBasedSecurityPrincipals as Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.IAadBasedSecurityPrincipal[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.IAadBasedSecurityPrincipal)(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.AadBasedSecurityPrincipal.FromJson(__u)))))() : null : AadBasedSecurityPrincipal; } { _certBasedSecurityPrincipal = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray>("certBasedSecurityPrincipals"), out var __jsonCertBasedSecurityPrincipals) ? If(__jsonCertBasedSecurityPrincipals as Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.ICertBasedSecurityPrincipal[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.ICertBasedSecurityPrincipal)(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.CertBasedSecurityPrincipal.FromJson(__p)))))() : null : CertBasedSecurityPrincipal; } AfterFromJson(json); }
/// <summary> /// Serializes this instance of <see cref="SystemData" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param> /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="SystemData" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy", container.Add); AddIf(null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType", container.Add); AddIf(null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt", container.Add); AddIf(null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy", container.Add); AddIf(null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType", container.Add); AddIf(null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ResourceProviderOperationDisplay" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param> /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ResourceProviderOperationDisplay" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider", container.Add); AddIf(null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource", container.Add); AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add); AddIf(null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter. /// Implement this method in a partial class to enable this behavior. /// </summary> /// <param name="json">The JsonNode that should be deserialized into this object.</param> /// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return /// instantly.</param> partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json, ref bool returnNow);
/// <summary> /// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. /// If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter. /// Implement this method in a partial class to enable this behavior. /// </summary> /// <param name="container">The JSON container that the serialization result will be placed in.</param> /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return /// instantly.</param> partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, ref bool returnNow);
/// <summary> /// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object /// before it is returned. Implement this method in a partial class to enable this behavior /// </summary> /// <param name="json">The JsonNode that should be deserialized into this object.</param> partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json);
/// <summary> /// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject" /// /> before it is returned. Implement this method in a partial class to enable this behavior /// </summary> /// <param name="container">The JSON container that the serialization result will be placed in.</param> partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container);
/// <summary> /// Serializes this instance of <see cref="CheckNameAvailabilityResponse" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param> /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="CheckNameAvailabilityResponse" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._nameAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonBoolean((bool)this._nameAvailable) : null, "nameAvailable", container.Add); AddIf(null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason", container.Add); AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ErrorAdditionalInfo" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param> /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ErrorAdditionalInfo" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) this._info.ToJson(null, serializationMode) : null, "info", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ResourceProviderOperationList" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param> /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ResourceProviderOperationList" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.XNodeArray(); foreach (var __x in this._value) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("value", __w); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ConfidentialLedger" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param> /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ConfidentialLedger" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } __resource?.ToJson(container, serializationMode); __resourceLocation?.ToJson(container, serializationMode); __tags1?.ToJson(container, serializationMode); AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="CertBasedSecurityPrincipal" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param> /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="CertBasedSecurityPrincipal" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._cert)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._cert.ToString()) : null, "cert", container.Add); AddIf(null != (((object)this._ledgerRoleName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonString(this._ledgerRoleName.ToString()) : null, "ledgerRoleName", container.Add); AfterToJson(ref container); return(container); }