示例#1
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="InboundEndpointPatchTags" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        /// <param name="exclusions"></param>
        internal InboundEndpointPatchTags(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.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.DnsResolver.Runtime.JsonSerializable.FromJson(json, ((Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.IAssociativeArray <string>) this).AdditionalProperties, null, exclusions);
            AfterFromJson(json);
        }
示例#2
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="VirtualNetworkLinkSubResourceProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VirtualNetworkLinkSubResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _virtualNetworkLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("virtualNetworkLink"), out var __jsonVirtualNetworkLink) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.SubResource.FromJson(__jsonVirtualNetworkLink) : VirtualNetworkLink; }
            AfterFromJson(json);
        }
示例#3
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="ProxyResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resource = new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20.Resource(json);
            AfterFromJson(json);
        }
示例#4
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="InboundEndpointPatch" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal InboundEndpointPatch(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.InboundEndpointPatchTags.FromJson(__jsonTags) : Tag; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="VirtualNetworkLinkPatchProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VirtualNetworkLinkPatchProperties(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _metadata = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("metadata"), out var __jsonMetadata) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.VirtualNetworkLinkPatchPropertiesMetadata.FromJson(__jsonMetadata) : Metadata; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="SubResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal SubResource(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="CloudError" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CloudError(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.CloudErrorBody.FromJson(__jsonError) : Error; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="ForwardingRulePatch" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ForwardingRulePatch(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.ForwardingRulePatchProperties.FromJson(__jsonProperties) : Property; }
            AfterFromJson(json);
        }
示例#9
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="DnsResolverListResult" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DnsResolverListResult(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.IDnsResolver[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.IDnsResolver)(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.DnsResolver.FromJson(__u)))))() : null : Value; }
            { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="VirtualNetworkDnsForwardingRuleset" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VirtualNetworkDnsForwardingRuleset(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.VirtualNetworkLinkSubResourceProperties.FromJson(__jsonProperties) : Property; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="TargetDnsServer" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal TargetDnsServer(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _iPAddress = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("ipAddress"), out var __jsonIPAddress) ? (string)__jsonIPAddress : (string)IPAddress; }
            { _port = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNumber>("port"), out var __jsonPort) ? (int?)__jsonPort : Port; }
            AfterFromJson(json);
        }
 /// <summary>
 /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="IPConfiguration" />.
 /// </summary>
 /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
 internal IPConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
 {
     bool returnNow = false;
     BeforeFromJson(json, ref returnNow);
     if (returnNow)
     {
         return;
     }
     {_subnet = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.SubResource.FromJson(__jsonSubnet) : Subnet;}
     {_privateIPAddress = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("privateIpAddress"), out var __jsonPrivateIPAddress) ? (string)__jsonPrivateIPAddress : (string)PrivateIPAddress;}
     {_privateIPAllocationMethod = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("privateIpAllocationMethod"), out var __jsonPrivateIPAllocationMethod) ? (string)__jsonPrivateIPAllocationMethod : (string)PrivateIPAllocationMethod;}
     AfterFromJson(json);
 }
示例#13
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="DnsForwardingRulesetProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DnsForwardingRulesetProperties(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _dnsResolverOutboundEndpoint = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonArray>("dnsResolverOutboundEndpoints"), out var __jsonDnsResolverOutboundEndpoints) ? If(__jsonDnsResolverOutboundEndpoints as Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.ISubResource[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.ISubResource)(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.SubResource.FromJson(__u)))))() : null : DnsResolverOutboundEndpoint; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _resourceGuid = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("resourceGuid"), out var __jsonResourceGuid) ? (string)__jsonResourceGuid : (string)ResourceGuid; }
            AfterFromJson(json);
        }
示例#14
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="VirtualNetworkLinkProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal VirtualNetworkLinkProperties(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _virtualNetwork = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("virtualNetwork"), out var __jsonVirtualNetwork) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.SubResource.FromJson(__jsonVirtualNetwork) : VirtualNetwork; }
            { _metadata = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("metadata"), out var __jsonMetadata) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.VirtualNetworkLinkPropertiesMetadata.FromJson(__jsonMetadata) : Metadata; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            AfterFromJson(json);
        }
示例#15
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="OutboundEndpointProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OutboundEndpointProperties(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _subnet = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.SubResource.FromJson(__jsonSubnet) : Subnet; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _resourceGuid = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("resourceGuid"), out var __jsonResourceGuid) ? (string)__jsonResourceGuid : (string)ResourceGuid; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="ForwardingRulePatchProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ForwardingRulePatchProperties(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _targetDnsServer = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonArray>("targetDnsServers"), out var __jsonTargetDnsServers) ? If(__jsonTargetDnsServers as Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.ITargetDnsServer[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.ITargetDnsServer)(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.TargetDnsServer.FromJson(__u)))))() : null : TargetDnsServer; }
            { _metadata = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("metadata"), out var __jsonMetadata) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.ForwardingRulePatchPropertiesMetadata.FromJson(__jsonMetadata) : Metadata; }
            { _forwardingRuleState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("forwardingRuleState"), out var __jsonForwardingRuleState) ? (string)__jsonForwardingRuleState : (string)ForwardingRuleState; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="DnsForwardingRuleset" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DnsForwardingRuleset(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20.TrackedResource(json);
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.DnsForwardingRulesetProperties.FromJson(__jsonProperties) : Property; }
            { _systemData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData; }
            { _etag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)Etag; }
            AfterFromJson(json);
        }
示例#18
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="CloudErrorBody" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CloudErrorBody(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; }
            { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; }
            { _target = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target; }
            { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonArray>("details"), out var __jsonDetails) ? If(__jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.ICloudErrorBody[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.ICloudErrorBody)(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.CloudErrorBody.FromJson(__u)))))() : null : Detail; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="DnsResolverProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DnsResolverProperties(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _virtualNetwork = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject>("virtualNetwork"), out var __jsonVirtualNetwork) ? Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20200401Preview.SubResource.FromJson(__jsonVirtualNetwork) : VirtualNetwork; }
            { _dnsResolverState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("dnsResolverState"), out var __jsonDnsResolverState) ? (string)__jsonDnsResolverState : (string)DnsResolverState; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _resourceGuid = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("resourceGuid"), out var __jsonResourceGuid) ? (string)__jsonResourceGuid : (string)ResourceGuid; }
            AfterFromJson(json);
        }
示例#20
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="SystemData" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _createdBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy; }
            { _createdByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType; }
            { _createdAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt; }
            { _lastModifiedBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy; }
            { _lastModifiedByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType; }
            { _lastModifiedAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt; }
            AfterFromJson(json);
        }
示例#21
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject into a new instance of <see cref="DnsResolverIdentity" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DnsResolverIdentity(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; }
            { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; }
            { _dnsResolverName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("dnsResolverName"), out var __jsonDnsResolverName) ? (string)__jsonDnsResolverName : (string)DnsResolverName; }
            { _virtualNetworkName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("virtualNetworkName"), out var __jsonVirtualNetworkName) ? (string)__jsonVirtualNetworkName : (string)VirtualNetworkName; }
            { _inboundEndpointName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("inboundEndpointName"), out var __jsonInboundEndpointName) ? (string)__jsonInboundEndpointName : (string)InboundEndpointName; }
            { _outboundEndpointName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("outboundEndpointName"), out var __jsonOutboundEndpointName) ? (string)__jsonOutboundEndpointName : (string)OutboundEndpointName; }
            { _dnsForwardingRulesetName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("dnsForwardingRulesetName"), out var __jsonDnsForwardingRulesetName) ? (string)__jsonDnsForwardingRulesetName : (string)DnsForwardingRulesetName; }
            { _forwardingRuleName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("forwardingRuleName"), out var __jsonForwardingRuleName) ? (string)__jsonForwardingRuleName : (string)ForwardingRuleName; }
            { _virtualNetworkLinkName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("virtualNetworkLinkName"), out var __jsonVirtualNetworkLinkName) ? (string)__jsonVirtualNetworkLinkName : (string)VirtualNetworkLinkName; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            AfterFromJson(json);
        }
示例#22
0
        /// <summary>
        /// Serializes this instance of <see cref="InboundEndpointPatchTags" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.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.DnsResolver.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="InboundEndpointPatchTags" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container);
            AfterToJson(ref container);
            return(container);
        }
示例#23
0
        /// <summary>
        /// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
        /// object before it is serialized.
        /// If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject container, ref bool returnNow);
示例#24
0
        /// <summary>
        /// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of
        /// the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="json">The JsonNode that should be deserialized into this object.</param>
        /// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject json, ref bool returnNow);
示例#25
0
        /// <summary>
        /// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.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.DnsResolver.Runtime.Json.JsonObject container);
示例#26
0
        /// <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.DnsResolver.Runtime.Json.JsonObject json);
        /// <summary>
        /// Serializes this instance of <see cref="ForwardingRuleProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.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.DnsResolver.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ForwardingRuleProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._domainName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._domainName.ToString()) : null, "domainName", container.Add);
            if (null != this._targetDnsServer)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.XNodeArray();
                foreach (var __x in this._targetDnsServer)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("targetDnsServers", __w);
            }
            AddIf(null != this._metadata ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) this._metadata.ToJson(null, serializationMode) : null, "metadata", container.Add);
            AddIf(null != (((object)this._forwardingRuleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._forwardingRuleState.ToString()) : null, "forwardingRuleState", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
示例#28
0
        /// <summary>
        /// Serializes this instance of <see cref="SystemData" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.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.DnsResolver.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="SystemData" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy", container.Add);
            AddIf(null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType", container.Add);
            AddIf(null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt", container.Add);
            AddIf(null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy", container.Add);
            AddIf(null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType", container.Add);
            AddIf(null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#29
0
        /// <summary>
        /// Serializes this instance of <see cref="InboundEndpointPatch" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.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.DnsResolver.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="InboundEndpointPatch" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) this._tag.ToJson(null, serializationMode) : null, "tags", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#30
0
        /// <summary>
        /// Serializes this instance of <see cref="DnsResolverListResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.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.DnsResolver.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="DnsResolverListResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (null != this._value)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.XNodeArray();
                foreach (var __x in this._value)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("value", __w);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }