Exemplo n.º 1
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject into a new instance of <see cref="A2AUpdateReplicationProtectedItemInput" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal A2AUpdateReplicationProtectedItemInput(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __updateReplicationProtectedItemProviderInput = new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.UpdateReplicationProtectedItemProviderInput(json);
            { _diskEncryptionInfo = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject>("diskEncryptionInfo"), out var __jsonDiskEncryptionInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.DiskEncryptionInfo.FromJson(__jsonDiskEncryptionInfo) : DiskEncryptionInfo; }
            { _recoveryCloudServiceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("recoveryCloudServiceId"), out var __jsonRecoveryCloudServiceId) ? (string)__jsonRecoveryCloudServiceId : (string)RecoveryCloudServiceId; }
            { _recoveryResourceGroupId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("recoveryResourceGroupId"), out var __jsonRecoveryResourceGroupId) ? (string)__jsonRecoveryResourceGroupId : (string)RecoveryResourceGroupId; }
            { _managedDiskUpdateDetail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonArray>("managedDiskUpdateDetails"), out var __jsonManagedDiskUpdateDetails) ? If(__jsonManagedDiskUpdateDetails as Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.IA2AvmManagedDiskUpdateDetails[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.IA2AvmManagedDiskUpdateDetails)(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.A2AvmManagedDiskUpdateDetails.FromJson(__u)))))() : null : ManagedDiskUpdateDetail; }
            { _recoveryBootDiagStorageAccountId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("recoveryBootDiagStorageAccountId"), out var __jsonRecoveryBootDiagStorageAccountId) ? (string)__jsonRecoveryBootDiagStorageAccountId : (string)RecoveryBootDiagStorageAccountId; }
            { _tfoAzureVMName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("tfoAzureVMName"), out var __jsonTfoAzureVMName) ? (string)__jsonTfoAzureVMName : (string)TfoAzureVMName; }
            { _recoveryProximityPlacementGroupId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("recoveryProximityPlacementGroupId"), out var __jsonRecoveryProximityPlacementGroupId) ? (string)__jsonRecoveryProximityPlacementGroupId : (string)RecoveryProximityPlacementGroupId; }
            { _recoveryVirtualMachineScaleSetId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("recoveryVirtualMachineScaleSetId"), out var __jsonRecoveryVirtualMachineScaleSetId) ? (string)__jsonRecoveryVirtualMachineScaleSetId : (string)RecoveryVirtualMachineScaleSetId; }
            AfterFromJson(json);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject into a new instance of <see cref="InMageAzureV2UpdateReplicationProtectedItemInput"
        /// />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal InMageAzureV2UpdateReplicationProtectedItemInput(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __updateReplicationProtectedItemProviderInput = new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.UpdateReplicationProtectedItemProviderInput(json);
            { _recoveryAzureV1ResourceGroupId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("recoveryAzureV1ResourceGroupId"), out var __jsonRecoveryAzureV1ResourceGroupId) ? (string)__jsonRecoveryAzureV1ResourceGroupId : (string)RecoveryAzureV1ResourceGroupId; }
            { _recoveryAzureV2ResourceGroupId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("recoveryAzureV2ResourceGroupId"), out var __jsonRecoveryAzureV2ResourceGroupId) ? (string)__jsonRecoveryAzureV2ResourceGroupId : (string)RecoveryAzureV2ResourceGroupId; }
            { _useManagedDisk = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("useManagedDisks"), out var __jsonUseManagedDisks) ? (string)__jsonUseManagedDisks : (string)UseManagedDisk; }
            { _targetProximityPlacementGroupId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetProximityPlacementGroupId"), out var __jsonTargetProximityPlacementGroupId) ? (string)__jsonTargetProximityPlacementGroupId : (string)TargetProximityPlacementGroupId; }
            { _targetAvailabilityZone = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetAvailabilityZone"), out var __jsonTargetAvailabilityZone) ? (string)__jsonTargetAvailabilityZone : (string)TargetAvailabilityZone; }
            { _targetVMTag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject>("targetVmTags"), out var __jsonTargetVMTags) ? Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.InMageAzureV2UpdateReplicationProtectedItemInputTargetVMTags.FromJson(__jsonTargetVMTags) : TargetVMTag; }
            { _targetManagedDiskTag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject>("targetManagedDiskTags"), out var __jsonTargetManagedDiskTags) ? Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.InMageAzureV2UpdateReplicationProtectedItemInputTargetManagedDiskTags.FromJson(__jsonTargetManagedDiskTags) : TargetManagedDiskTag; }
            { _targetNicTag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject>("targetNicTags"), out var __jsonTargetNicTags) ? Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.InMageAzureV2UpdateReplicationProtectedItemInputTargetNicTags.FromJson(__jsonTargetNicTags) : TargetNicTag; }
            { _sqlServerLicenseType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("sqlServerLicenseType"), out var __jsonSqlServerLicenseType) ? (string)__jsonSqlServerLicenseType : (string)SqlServerLicenseType; }
            AfterFromJson(json);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject into a new instance of <see cref="InMageRcmUpdateReplicationProtectedItemInput"
        /// />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal InMageRcmUpdateReplicationProtectedItemInput(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __updateReplicationProtectedItemProviderInput = new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.UpdateReplicationProtectedItemProviderInput(json);
            { _targetVMName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetVmName"), out var __jsonTargetVMName) ? (string)__jsonTargetVMName : (string)TargetVMName; }
            { _targetVMSize = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetVmSize"), out var __jsonTargetVMSize) ? (string)__jsonTargetVMSize : (string)TargetVMSize; }
            { _targetResourceGroupId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetResourceGroupId"), out var __jsonTargetResourceGroupId) ? (string)__jsonTargetResourceGroupId : (string)TargetResourceGroupId; }
            { _targetAvailabilitySetId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetAvailabilitySetId"), out var __jsonTargetAvailabilitySetId) ? (string)__jsonTargetAvailabilitySetId : (string)TargetAvailabilitySetId; }
            { _targetAvailabilityZone = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetAvailabilityZone"), out var __jsonTargetAvailabilityZone) ? (string)__jsonTargetAvailabilityZone : (string)TargetAvailabilityZone; }
            { _targetProximityPlacementGroupId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetProximityPlacementGroupId"), out var __jsonTargetProximityPlacementGroupId) ? (string)__jsonTargetProximityPlacementGroupId : (string)TargetProximityPlacementGroupId; }
            { _targetBootDiagnosticsStorageAccountId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetBootDiagnosticsStorageAccountId"), out var __jsonTargetBootDiagnosticsStorageAccountId) ? (string)__jsonTargetBootDiagnosticsStorageAccountId : (string)TargetBootDiagnosticsStorageAccountId; }
            { _targetNetworkId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("targetNetworkId"), out var __jsonTargetNetworkId) ? (string)__jsonTargetNetworkId : (string)TargetNetworkId; }
            { _testNetworkId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("testNetworkId"), out var __jsonTestNetworkId) ? (string)__jsonTestNetworkId : (string)TestNetworkId; }
            { _vMNic = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonArray>("vmNics"), out var __jsonVMNics) ? If(__jsonVMNics as Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.IInMageRcmNicInput[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.IInMageRcmNicInput)(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.InMageRcmNicInput.FromJson(__u)))))() : null : VMNic; }
            { _licenseType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("licenseType"), out var __jsonLicenseType) ? (string)__jsonLicenseType : (string)LicenseType; }
            AfterFromJson(json);
        }