/// <summary>
        /// Serializes this instance of <see cref="ClusterPrincipalProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ClusterPrincipalProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId", container.Add);
            AddIf(null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._role.ToString()) : null, "role", container.Add);
            AddIf(null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId", container.Add);
            AddIf(null != (((object)this._principalType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._principalType.ToString()) : null, "principalType", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._tenantName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._tenantName.ToString()) : null, "tenantName", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._principalName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._principalName.ToString()) : null, "principalName", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ReadWriteDatabaseProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ReadWriteDatabaseProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._statistics ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._statistics.ToJson(null, serializationMode) : null, "statistics", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode)(null != this._softDeletePeriod ? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan) this._softDeletePeriod)): null), "softDeletePeriod", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode)(null != this._hotCachePeriod ? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan) this._hotCachePeriod)): null), "hotCachePeriod", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._isFollowed ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonBoolean((bool)this._isFollowed) : null, "isFollowed", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="AttachedDatabaseConfigurationProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AttachedDatabaseConfigurationProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode"
        /// />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._tableLevelSharingProperty ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._tableLevelSharingProperty.ToJson(null, serializationMode) : null, "tableLevelSharingProperties", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            AddIf(null != (((object)this._databaseName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._databaseName.ToString()) : null, "databaseName", container.Add);
            AddIf(null != (((object)this._kustoPoolResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._kustoPoolResourceId.ToString()) : null, "clusterResourceId", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._attachedDatabaseName)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                    foreach (var __x in this._attachedDatabaseName)
                    {
                        AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                    }
                    container.Add("attachedDatabaseNames", __w);
                }
            }
            AddIf(null != (((object)this._defaultPrincipalsModificationKind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._defaultPrincipalsModificationKind.ToString()) : null, "defaultPrincipalsModificationKind", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Serializes this instance of <see cref="Resource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Resource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Serializes this instance of <see cref="KustoPool" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="KustoPool" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __trackedResource?.ToJson(container, serializationMode);
            AddIf(null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._sku.ToJson(null, serializationMode) : null, "sku", container.Add);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._systemData.ToJson(null, serializationMode) : null, "systemData", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._etag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._etag.ToString()) : null, "etag", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Serializes this instance of <see cref="ErrorDetail" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ErrorDetail" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._target.ToString()) : null, "target", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._detail)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                    foreach (var __x in this._detail)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("details", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._additionalInfo)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                    foreach (var __s in this._additionalInfo)
                    {
                        AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                    }
                    container.Add("additionalInfo", __r);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="EventHubConnectionProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="EventHubConnectionProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._eventHubResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._eventHubResourceId.ToString()) : null, "eventHubResourceId", container.Add);
            AddIf(null != (((object)this._consumerGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._consumerGroup.ToString()) : null, "consumerGroup", container.Add);
            AddIf(null != (((object)this._tableName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._tableName.ToString()) : null, "tableName", container.Add);
            AddIf(null != (((object)this._mappingRuleName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._mappingRuleName.ToString()) : null, "mappingRuleName", container.Add);
            AddIf(null != (((object)this._dataFormat)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._dataFormat.ToString()) : null, "dataFormat", container.Add);
            if (null != this._eventSystemProperty)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                foreach (var __x in this._eventSystemProperty)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("eventSystemProperties", __w);
            }
            AddIf(null != (((object)this._compression)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._compression.ToString()) : null, "compression", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="SkuDescriptionList" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="SkuDescriptionList" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._value)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                    foreach (var __x in this._value)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("value", __w);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Serializes this instance of <see cref="EventGridConnectionProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="EventGridConnectionProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._storageAccountResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._storageAccountResourceId.ToString()) : null, "storageAccountResourceId", container.Add);
            AddIf(null != (((object)this._eventHubResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._eventHubResourceId.ToString()) : null, "eventHubResourceId", container.Add);
            AddIf(null != (((object)this._consumerGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._consumerGroup.ToString()) : null, "consumerGroup", container.Add);
            AddIf(null != (((object)this._tableName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._tableName.ToString()) : null, "tableName", container.Add);
            AddIf(null != (((object)this._mappingRuleName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._mappingRuleName.ToString()) : null, "mappingRuleName", container.Add);
            AddIf(null != (((object)this._dataFormat)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._dataFormat.ToString()) : null, "dataFormat", container.Add);
            AddIf(null != this._ignoreFirstRecord ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonBoolean((bool)this._ignoreFirstRecord) : null, "ignoreFirstRecord", container.Add);
            AddIf(null != (((object)this._blobStorageEventType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._blobStorageEventType.ToString()) : null, "blobStorageEventType", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="FollowerDatabaseDefinition" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="FollowerDatabaseDefinition" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._clusterResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._clusterResourceId.ToString()) : null, "clusterResourceId", container.Add);
            AddIf(null != (((object)this._attachedDatabaseConfigurationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._attachedDatabaseConfigurationName.ToString()) : null, "attachedDatabaseConfigurationName", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._databaseName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._databaseName.ToString()) : null, "databaseName", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Serializes this instance of <see cref="Database" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Database" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __resource?.ToJson(container, serializationMode);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._systemData.ToJson(null, serializationMode) : null, "systemData", container.Add);
            }
            AddIf(null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._location.ToString()) : null, "location", container.Add);
            AddIf(null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Serializes this instance of <see cref="KustoPoolProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="KustoPoolProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._optimizedAutoscale ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._optimizedAutoscale.ToJson(null, serializationMode) : null, "optimizedAutoscale", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._languageExtension ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._languageExtension.ToJson(null, serializationMode) : null, "languageExtensions", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._state)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._state.ToString()) : null, "state", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._dataIngestionUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._dataIngestionUri.ToString()) : null, "dataIngestionUri", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._stateReason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._stateReason.ToString()) : null, "stateReason", container.Add);
            }
            AddIf(null != this._enableStreamingIngest ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonBoolean((bool)this._enableStreamingIngest) : null, "enableStreamingIngest", container.Add);
            AddIf(null != this._enablePurge ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonBoolean((bool)this._enablePurge) : null, "enablePurge", container.Add);
            AddIf(null != (((object)this._workspaceUid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._workspaceUid.ToString()) : null, "workspaceUID", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Serializes this instance of <see cref="SkuDescription" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="SkuDescription" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._size)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._size.ToString()) : null, "size", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._location)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                    foreach (var __x in this._location)
                    {
                        AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                    }
                    container.Add("locations", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._locationInfo)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                    foreach (var __s in this._locationInfo)
                    {
                        AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                    }
                    container.Add("locationInfo", __r);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._restriction)
                {
                    var __m = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                    foreach (var __n in this._restriction)
                    {
                        AddIf(__n?.ToJson(null, serializationMode), __m.Add);
                    }
                    container.Add("restrictions", __m);
                }
            }
            AfterToJson(ref container);
            return(container);
        }