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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ResourceSettings(json);
            AfterFromJson(json);
        }
Example #2
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="NetworkSecurityGroupResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal NetworkSecurityGroupResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ResourceSettings(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.NetworkSecurityGroupResourceSettingsTags.FromJson(__jsonTags) : Tag; }
            { _securityRule = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray>("securityRules"), out var __jsonSecurityRules) ? If(__jsonSecurityRules as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.INsgSecurityRule[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.INsgSecurityRule)(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.NsgSecurityRule.FromJson(__u)))))() : null : SecurityRule; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="SqlDatabaseResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal SqlDatabaseResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ResourceSettings(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.SqlDatabaseResourceSettingsTags.FromJson(__jsonTags) : Tag; }
            { _zoneRedundant = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("zoneRedundant"), out var __jsonZoneRedundant) ? (string)__jsonZoneRedundant : (string)ZoneRedundant; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="NetworkInterfaceResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal NetworkInterfaceResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ResourceSettings(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.NetworkInterfaceResourceSettingsTags.FromJson(__jsonTags) : Tag; }
            { _iPConfiguration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray>("ipConfigurations"), out var __jsonIPConfigurations) ? If(__jsonIPConfigurations as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.INicIPConfigurationResourceSettings[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.INicIPConfigurationResourceSettings)(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.NicIPConfigurationResourceSettings.FromJson(__u)))))() : null : IPConfiguration; }
            { _enableAcceleratedNetworking = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean>("enableAcceleratedNetworking"), out var __jsonEnableAcceleratedNetworking) ? (bool?)__jsonEnableAcceleratedNetworking : EnableAcceleratedNetworking; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="AvailabilitySetResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AvailabilitySetResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ResourceSettings(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.AvailabilitySetResourceSettingsTags.FromJson(__jsonTags) : Tag; }
            { _faultDomain = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNumber>("faultDomain"), out var __jsonFaultDomain) ? (int?)__jsonFaultDomain : FaultDomain; }
            { _updateDomain = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNumber>("updateDomain"), out var __jsonUpdateDomain) ? (int?)__jsonUpdateDomain : UpdateDomain; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="VirtualNetworkResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VirtualNetworkResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ResourceSettings(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.VirtualNetworkResourceSettingsTags.FromJson(__jsonTags) : Tag; }
            { _enableDdosProtection = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean>("enableDdosProtection"), out var __jsonEnableDdosProtection) ? (bool?)__jsonEnableDdosProtection : EnableDdosProtection; }
            { _addressSpace = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray>("addressSpace"), out var __jsonAddressSpace) ? If(__jsonAddressSpace as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : AddressSpace; }
            { _dnsServer = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray>("dnsServers"), out var __jsonDnsServers) ? If(__jsonDnsServers as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (string)(__p is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null))))() : null : DnsServer; }
            { _subnet = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray>("subnets"), out var __jsonSubnets) ? If(__jsonSubnets as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __l) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ISubnetResourceSettings[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k) => (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ISubnetResourceSettings)(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.SubnetResourceSettings.FromJson(__k)))))() : null : Subnet; }
            AfterFromJson(json);
        }
Example #7
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="VirtualMachineResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VirtualMachineResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ResourceSettings(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.VirtualMachineResourceSettingsTags.FromJson(__jsonTags) : Tag; }
            { _userManagedIdentity = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray>("userManagedIdentities"), out var __jsonUserManagedIdentities) ? If(__jsonUserManagedIdentities as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : UserManagedIdentity; }
            { _targetAvailabilityZone = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("targetAvailabilityZone"), out var __jsonTargetAvailabilityZone) ? (string)__jsonTargetAvailabilityZone : (string)TargetAvailabilityZone; }
            { _targetVMSize = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("targetVmSize"), out var __jsonTargetVMSize) ? (string)__jsonTargetVMSize : (string)TargetVMSize; }
            { _targetAvailabilitySetId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("targetAvailabilitySetId"), out var __jsonTargetAvailabilitySetId) ? (string)__jsonTargetAvailabilitySetId : (string)TargetAvailabilitySetId; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="LoadBalancerResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal LoadBalancerResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ResourceSettings(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.LoadBalancerResourceSettingsTags.FromJson(__jsonTags) : Tag; }
            { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("sku"), out var __jsonSku) ? (string)__jsonSku : (string)Sku; }
            { _frontendIPConfiguration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray>("frontendIPConfigurations"), out var __jsonFrontendIPConfigurations) ? If(__jsonFrontendIPConfigurations as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ILbFrontendIpconfigurationResourceSettings[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ILbFrontendIpconfigurationResourceSettings)(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.LbFrontendIpconfigurationResourceSettings.FromJson(__u)))))() : null : FrontendIPConfiguration; }
            { _backendAddressPool = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray>("backendAddressPools"), out var __jsonBackendAddressPools) ? If(__jsonBackendAddressPools as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ILbBackendAddressPoolResourceSettings[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ILbBackendAddressPoolResourceSettings)(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.LbBackendAddressPoolResourceSettings.FromJson(__p)))))() : null : BackendAddressPool; }
            { _zone = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("zones"), out var __jsonZones) ? (string)__jsonZones : (string)Zone; }
            AfterFromJson(json);
        }
Example #9
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="PublicIPAddressResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal PublicIPAddressResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.ResourceSettings(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20210801.PublicIPAddressResourceSettingsTags.FromJson(__jsonTags) : Tag; }
            { _domainNameLabel = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("domainNameLabel"), out var __jsonDomainNameLabel) ? (string)__jsonDomainNameLabel : (string)DomainNameLabel; }
            { _fqdn = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("fqdn"), out var __jsonFqdn) ? (string)__jsonFqdn : (string)Fqdn; }
            { _publicIPAllocationMethod = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("publicIpAllocationMethod"), out var __jsonPublicIPAllocationMethod) ? (string)__jsonPublicIPAllocationMethod : (string)PublicIPAllocationMethod; }
            { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("sku"), out var __jsonSku) ? (string)__jsonSku : (string)Sku; }
            { _zone = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString>("zones"), out var __jsonZones) ? (string)__jsonZones : (string)Zone; }
            AfterFromJson(json);
        }