Пример #1
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="KeyVaultResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal KeyVaultResourceSettings(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.Api202101.ResourceSettings(json);
            AfterFromJson(json);
        }
 /// <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.Api202101.ResourceSettings(json);
     {_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.Api202101.INsgSecurityRule[]>(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NsgSecurityRule.FromJson(__u) )) ))() : null : SecurityRule;}
     AfterFromJson(json);
 }
Пример #3
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of <see cref="SqlElasticPoolResourceSettings" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal SqlElasticPoolResourceSettings(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.Api202101.ResourceSettings(json);
            { _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.Api202101.ResourceSettings(json);
            { _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.Api202101.INicIPConfigurationResourceSettings[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings)(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.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);
        }
Пример #5
0
        /// <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.Api202101.ResourceSettings(json);
            { _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="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.Api202101.ResourceSettings(json);
            { _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);
        }
Пример #7
0
        /// <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.Api202101.ResourceSettings(json);
            { _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.Api202101.ILbFrontendIpconfigurationResourceSettings[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings)(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.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.Api202101.ILbBackendAddressPoolResourceSettings[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings)(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.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);
        }
        /// <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.Api202101.ResourceSettings(json);
            { _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.Api202101.ISubnetResourceSettings[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k) => (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings)(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SubnetResourceSettings.FromJson(__k)))))() : null : Subnet; }
            AfterFromJson(json);
        }
        /// <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.Api202101.ResourceSettings(json);
            { _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);
        }