/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="DomainServiceProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal DomainServiceProperties(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _ldapsSetting = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("ldapsSettings"), out var __jsonLdapsSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings.FromJson(__jsonLdapsSettings) : LdapsSetting; } { _resourceForestSetting = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("resourceForestSettings"), out var __jsonResourceForestSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings.FromJson(__jsonResourceForestSettings) : ResourceForestSetting; } { _domainSecuritySetting = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("domainSecuritySettings"), out var __jsonDomainSecuritySettings) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings.FromJson(__jsonDomainSecuritySettings) : DomainSecuritySetting; } { _notificationSetting = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("notificationSettings"), out var __jsonNotificationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings.FromJson(__jsonNotificationSettings) : NotificationSetting; } { _migrationProperty = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("migrationProperties"), out var __jsonMigrationProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.MigrationProperties.FromJson(__jsonMigrationProperties) : MigrationProperty; } { _version = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNumber>("version"), out var __jsonVersion) ? (int?)__jsonVersion : Version; } { _tenantId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId; } { _domainName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("domainName"), out var __jsonDomainName) ? (string)__jsonDomainName : (string)DomainName; } { _deploymentId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("deploymentId"), out var __jsonDeploymentId) ? (string)__jsonDeploymentId : (string)DeploymentId; } { _syncOwner = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("syncOwner"), out var __jsonSyncOwner) ? (string)__jsonSyncOwner : (string)SyncOwner; } { _replicaSet = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray>("replicaSets"), out var __jsonReplicaSets) ? If(__jsonReplicaSets as Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IReplicaSet[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IReplicaSet)(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet.FromJson(__u)))))() : null : ReplicaSet; } { _domainConfigurationType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("domainConfigurationType"), out var __jsonDomainConfigurationType) ? (string)__jsonDomainConfigurationType : (string)DomainConfigurationType; } { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("sku"), out var __jsonSku) ? (string)__jsonSku : (string)Sku; } { _filteredSync = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("filteredSync"), out var __jsonFilteredSync) ? (string)__jsonFilteredSync : (string)FilteredSync; } { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="CloudError" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal CloudError(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.CloudErrorBody.FromJson(__jsonError) : Error; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="ResourceTags" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> /// <param name="exclusions"></param> internal ResourceTags(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.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.ADDomainServices.Runtime.JsonSerializable.FromJson(json, ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IAssociativeArray <string>) this).AdditionalProperties, null, exclusions); AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="OperationEntityListResult" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal OperationEntityListResult(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IOperationEntity[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IOperationEntity)(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.OperationEntity.FromJson(__u)))))() : null : Value; } { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="ResourceForestSettings" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal ResourceForestSettings(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _setting = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray>("settings"), out var __jsonSettings) ? If(__jsonSettings as Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IForestTrust[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IForestTrust)(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ForestTrust.FromJson(__u)))))() : null : Setting; } { _resourceForest = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("resourceForest"), out var __jsonResourceForest) ? (string)__jsonResourceForest : (string)ResourceForest; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="MigrationProgress" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal MigrationProgress(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _completionPercentage = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNumber>("completionPercentage"), out var __jsonCompletionPercentage) ? (double?)__jsonCompletionPercentage : CompletionPercentage; } { _progressMessage = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("progressMessage"), out var __jsonProgressMessage) ? (string)__jsonProgressMessage : (string)ProgressMessage; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="DomainService" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal DomainService(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.Resource(json); { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainServiceProperties.FromJson(__jsonProperties) : Property; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="NotificationSettings" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal NotificationSettings(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _notifyGlobalAdmin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("notifyGlobalAdmins"), out var __jsonNotifyGlobalAdmins) ? (string)__jsonNotifyGlobalAdmins : (string)NotifyGlobalAdmin; } { _notifyDcAdmin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("notifyDcAdmins"), out var __jsonNotifyDcAdmins) ? (string)__jsonNotifyDcAdmins : (string)NotifyDcAdmin; } { _additionalRecipient = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray>("additionalRecipients"), out var __jsonAdditionalRecipients) ? If(__jsonAdditionalRecipients as Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.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.ADDomainServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : AdditionalRecipient; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="OperationEntity" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal OperationEntity(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.OperationDisplayInfo.FromJson(__jsonDisplay) : Display; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _origin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="MigrationProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal MigrationProperties(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _migrationProgress = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("migrationProgress"), out var __jsonMigrationProgress) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.MigrationProgress.FromJson(__jsonMigrationProgress) : MigrationProgress; } { _oldSubnetId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("oldSubnetId"), out var __jsonOldSubnetId) ? (string)__jsonOldSubnetId : (string)OldSubnetId; } { _oldVnetSiteId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("oldVnetSiteId"), out var __jsonOldVnetSiteId) ? (string)__jsonOldVnetSiteId : (string)OldVnetSiteId; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="HealthMonitor" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal HealthMonitor(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("details"), out var __jsonDetails) ? (string)__jsonDetails : (string)Detail; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="OperationDisplayInfo" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal OperationDisplayInfo(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; } { _operation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation; } { _provider = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider; } { _resource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="AdDomainServicesIdentity" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal AdDomainServicesIdentity(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; } { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; } { _domainServiceName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("domainServiceName"), out var __jsonDomainServiceName) ? (string)__jsonDomainServiceName : (string)DomainServiceName; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="CloudErrorBody" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal CloudErrorBody(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; } { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; } { _target = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target; } { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray>("details"), out var __jsonDetails) ? If(__jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ICloudErrorBody[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ICloudErrorBody)(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.CloudErrorBody.FromJson(__u)))))() : null : Detail; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="DomainSecuritySettings" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal DomainSecuritySettings(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _ntlmV1 = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("ntlmV1"), out var __jsonNtlmV1) ? (string)__jsonNtlmV1 : (string)NtlmV1; } { _tlsV1 = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("tlsV1"), out var __jsonTlsV1) ? (string)__jsonTlsV1 : (string)TlsV1; } { _syncNtlmPassword = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("syncNtlmPasswords"), out var __jsonSyncNtlmPasswords) ? (string)__jsonSyncNtlmPasswords : (string)SyncNtlmPassword; } { _syncKerberosPassword = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("syncKerberosPasswords"), out var __jsonSyncKerberosPasswords) ? (string)__jsonSyncKerberosPasswords : (string)SyncKerberosPassword; } { _syncOnPremPassword = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("syncOnPremPasswords"), out var __jsonSyncOnPremPasswords) ? (string)__jsonSyncOnPremPasswords : (string)SyncOnPremPassword; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="ForestTrust" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal ForestTrust(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _trustedDomainFqdn = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("trustedDomainFqdn"), out var __jsonTrustedDomainFqdn) ? (string)__jsonTrustedDomainFqdn : (string)TrustedDomainFqdn; } { _trustDirection = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("trustDirection"), out var __jsonTrustDirection) ? (string)__jsonTrustDirection : (string)TrustDirection; } { _friendlyName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName; } { _remoteDnsIP = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("remoteDnsIps"), out var __jsonRemoteDnsIps) ? (string)__jsonRemoteDnsIps : (string)RemoteDnsIP; } { _trustPassword = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("trustPassword"), out var __jsonTrustPassword) ? (string)__jsonTrustPassword : (string)TrustPassword; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="Resource" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal Resource(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; } { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceTags.FromJson(__jsonTags) : Tag; } { _etag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)Etag; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="LdapsSettings" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal LdapsSettings(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _ldap = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("ldaps"), out var __jsonLdaps) ? (string)__jsonLdaps : (string)Ldap; } { _pfxCertificate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("pfxCertificate"), out var __w) ? System.Convert.FromBase64String(((string)__w).Replace("_", "/").Replace("-", "+").PadRight(((string)__w).Length + ((string)__w).Length * 3 % 4, '=')) : null; } { _pfxCertificatePassword = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("pfxCertificatePassword"), out var __jsonPfxCertificatePassword) ? new System.Net.NetworkCredential("", (string)__jsonPfxCertificatePassword).SecurePassword : PfxCertificatePassword; } { _publicCertificate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("publicCertificate"), out var __jsonPublicCertificate) ? (string)__jsonPublicCertificate : (string)PublicCertificate; } { _certificateThumbprint = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("certificateThumbprint"), out var __jsonCertificateThumbprint) ? (string)__jsonCertificateThumbprint : (string)CertificateThumbprint; } { _certificateNotAfter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("certificateNotAfter"), out var __jsonCertificateNotAfter) ? global::System.DateTime.TryParse((string)__jsonCertificateNotAfter, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCertificateNotAfterValue) ? __jsonCertificateNotAfterValue : CertificateNotAfter : CertificateNotAfter; } { _externalAccess = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("externalAccess"), out var __jsonExternalAccess) ? (string)__jsonExternalAccess : (string)ExternalAccess; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="LdapsSettings" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal LdapsSettings(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _ldap = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("ldaps"), out var __jsonLdaps) ? (string)__jsonLdaps : (string)Ldap; } { _pfxCertificate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("pfxCertificate"), out var __jsonPfxCertificate) ? (string)__jsonPfxCertificate : (string)PfxCertificate; } { _pfxCertificatePassword = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("pfxCertificatePassword"), out var __jsonPfxCertificatePassword) ? (string)__jsonPfxCertificatePassword : (string)PfxCertificatePassword; } { _publicCertificate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("publicCertificate"), out var __jsonPublicCertificate) ? (string)__jsonPublicCertificate : (string)PublicCertificate; } { _certificateThumbprint = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("certificateThumbprint"), out var __jsonCertificateThumbprint) ? (string)__jsonCertificateThumbprint : (string)CertificateThumbprint; } { _certificateNotAfter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("certificateNotAfter"), out var __jsonCertificateNotAfter) ? global::System.DateTime.TryParse((string)__jsonCertificateNotAfter, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCertificateNotAfterValue) ? __jsonCertificateNotAfterValue : CertificateNotAfter : CertificateNotAfter; } { _externalAccess = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("externalAccess"), out var __jsonExternalAccess) ? (string)__jsonExternalAccess : (string)ExternalAccess; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="HealthAlert" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal HealthAlert(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _issue = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("issue"), out var __jsonIssue) ? (string)__jsonIssue : (string)Issue; } { _severity = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("severity"), out var __jsonSeverity) ? (string)__jsonSeverity : (string)Severity; } { _raised = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("raised"), out var __jsonRaised) ? global::System.DateTime.TryParse((string)__jsonRaised, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRaisedValue) ? __jsonRaisedValue : Raised : Raised; } { _lastDetected = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("lastDetected"), out var __jsonLastDetected) ? global::System.DateTime.TryParse((string)__jsonLastDetected, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastDetectedValue) ? __jsonLastDetectedValue : LastDetected : LastDetected; } { _resolutionUri = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("resolutionUri"), out var __jsonResolutionUri) ? (string)__jsonResolutionUri : (string)ResolutionUri; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject into a new instance of <see cref="ReplicaSet" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject instance to deserialize from.</param> internal ReplicaSet(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("replicaSetId"), out var __jsonReplicaSetId) ? (string)__jsonReplicaSetId : (string)Id; } { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; } { _vnetSiteId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("vnetSiteId"), out var __jsonVnetSiteId) ? (string)__jsonVnetSiteId : (string)VnetSiteId; } { _subnetId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)SubnetId; } { _domainControllerIPAddress = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray>("domainControllerIpAddress"), out var __jsonDomainControllerIPAddress) ? If(__jsonDomainControllerIPAddress as Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.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.ADDomainServices.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : DomainControllerIPAddress; } { _externalAccessIPAddress = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("externalAccessIpAddress"), out var __jsonExternalAccessIPAddress) ? (string)__jsonExternalAccessIPAddress : (string)ExternalAccessIPAddress; } { _serviceStatus = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("serviceStatus"), out var __jsonServiceStatus) ? (string)__jsonServiceStatus : (string)ServiceStatus; } { _healthLastEvaluated = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString>("healthLastEvaluated"), out var __jsonHealthLastEvaluated) ? global::System.DateTime.TryParse((string)__jsonHealthLastEvaluated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonHealthLastEvaluatedValue) ? __jsonHealthLastEvaluatedValue : HealthLastEvaluated : HealthLastEvaluated; } { _healthMonitor = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray>("healthMonitors"), out var __jsonHealthMonitors) ? If(__jsonHealthMonitors as Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IHealthMonitor[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IHealthMonitor)(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.HealthMonitor.FromJson(__p)))))() : null : HealthMonitor; } { _healthAlert = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray>("healthAlerts"), out var __jsonHealthAlerts) ? If(__jsonHealthAlerts as Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonArray, out var __l) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IHealthAlert[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k) => (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IHealthAlert)(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.HealthAlert.FromJson(__k)))))() : null : HealthAlert; } AfterFromJson(json); }
/// <summary> /// Serializes this instance of <see cref="LdapsSettings" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.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.ADDomainServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="LdapsSettings" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._ldap)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._ldap.ToString()) : null, "ldaps", container.Add); AddIf(null != this._pfxCertificate ? global::System.Convert.ToBase64String(this._pfxCertificate) : null, (v) => container.Add("pfxCertificate", v)); AddIf(null != (((object)this._pfxCertificatePassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._pfxCertificatePassword))) : null, "pfxCertificatePassword", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._publicCertificate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._publicCertificate.ToString()) : null, "publicCertificate", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._certificateThumbprint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._certificateThumbprint.ToString()) : null, "certificateThumbprint", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._certificateNotAfter ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._certificateNotAfter?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "certificateNotAfter", container.Add); } AddIf(null != (((object)this._externalAccess)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._externalAccess.ToString()) : null, "externalAccess", container.Add); AfterToJson(ref container); return(container); }
/// <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 <paramref name="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.ADDomainServices.Runtime.Json.JsonObject container, ref bool returnNow);
/// <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 <paramref name= "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.ADDomainServices.Runtime.Json.JsonObject json, ref bool returnNow);
/// <summary> /// <c>AfterToJson</c> will be called after the json serialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.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.ADDomainServices.Runtime.Json.JsonObject container);
/// <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.ADDomainServices.Runtime.Json.JsonObject json);
/// <summary> /// Serializes this instance of <see cref="DomainService" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.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.ADDomainServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="DomainService" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } __resource?.ToJson(container, serializationMode); AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ReplicaSet" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.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.ADDomainServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ReplicaSet" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._id.ToString()) : null, "replicaSetId", container.Add); } AddIf(null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._location.ToString()) : null, "location", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._vnetSiteId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._vnetSiteId.ToString()) : null, "vnetSiteId", container.Add); } AddIf(null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._domainControllerIPAddress) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.XNodeArray(); foreach (var __x in this._domainControllerIPAddress) { AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add); } container.Add("domainControllerIpAddress", __w); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._externalAccessIPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._externalAccessIPAddress.ToString()) : null, "externalAccessIpAddress", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._serviceStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._serviceStatus.ToString()) : null, "serviceStatus", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._healthLastEvaluated ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._healthLastEvaluated?.ToString(@"R", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "healthLastEvaluated", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._healthMonitor) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.XNodeArray(); foreach (var __s in this._healthMonitor) { AddIf(__s?.ToJson(null, serializationMode), __r.Add); } container.Add("healthMonitors", __r); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._healthAlert) { var __m = new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.XNodeArray(); foreach (var __n in this._healthAlert) { AddIf(__n?.ToJson(null, serializationMode), __m.Add); } container.Add("healthAlerts", __m); } } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="DomainServiceProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.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.ADDomainServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="DomainServiceProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._ldapsSetting ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) this._ldapsSetting.ToJson(null, serializationMode) : null, "ldapsSettings", container.Add); AddIf(null != this._resourceForestSetting ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) this._resourceForestSetting.ToJson(null, serializationMode) : null, "resourceForestSettings", container.Add); AddIf(null != this._domainSecuritySetting ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) this._domainSecuritySetting.ToJson(null, serializationMode) : null, "domainSecuritySettings", container.Add); AddIf(null != this._notificationSetting ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) this._notificationSetting.ToJson(null, serializationMode) : null, "notificationSettings", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._migrationProperty ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) this._migrationProperty.ToJson(null, serializationMode) : null, "migrationProperties", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._version ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNumber((int)this._version) : null, "version", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId", container.Add); } AddIf(null != (((object)this._domainName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._domainName.ToString()) : null, "domainName", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._deploymentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._deploymentId.ToString()) : null, "deploymentId", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._syncOwner)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._syncOwner.ToString()) : null, "syncOwner", container.Add); } if (null != this._replicaSet) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.XNodeArray(); foreach (var __x in this._replicaSet) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("replicaSets", __w); } AddIf(null != (((object)this._domainConfigurationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._domainConfigurationType.ToString()) : null, "domainConfigurationType", container.Add); AddIf(null != (((object)this._sku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._sku.ToString()) : null, "sku", container.Add); AddIf(null != (((object)this._filteredSync)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._filteredSync.ToString()) : null, "filteredSync", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ResourceTags" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.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.ADDomainServices.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ResourceTags" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container); AfterToJson(ref container); return(container); }