Ejemplo n.º 1
0
        /// <summary>
        /// Serializes this instance of <see cref="SystemData" /> 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="SystemData" /> 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._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy", container.Add);
            AddIf(null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType", container.Add);
            AddIf(null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.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.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy", container.Add);
            AddIf(null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType", container.Add);
            AddIf(null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.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);
        }
        /// <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);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Serializes this instance of <see cref="AttachedDatabaseConfigurationListResult" /> 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="AttachedDatabaseConfigurationListResult" /> 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 (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);
        }
        /// <summary>
        /// Serializes this instance of <see cref="IotHubDataConnection" /> 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="IotHubDataConnection" /> 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);
            }
            __dataConnection?.ToJson(container, serializationMode);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ClusterPrincipalAssignment" /> 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="ClusterPrincipalAssignment" /> 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);
            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);
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Serializes this instance of <see cref="Any" /> 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="Any" /> 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);
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Serializes this instance of <see cref="SynapseIdentity" /> 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="SynapseIdentity" /> 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._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId", 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._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName", container.Add);
            AddIf(null != (((object)this._workspaceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._workspaceName.ToString()) : null, "workspaceName", container.Add);
            AddIf(null != (((object)this._kustoPoolName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._kustoPoolName.ToString()) : null, "kustoPoolName", 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);
            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._dataConnectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._dataConnectionName.ToString()) : null, "dataConnectionName", container.Add);
            AddIf(null != (((object)this._principalAssignmentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._principalAssignmentName.ToString()) : null, "principalAssignmentName", container.Add);
            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);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Serializes this instance of <see cref="SkuLocationInfoItem" /> 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="SkuLocationInfoItem" /> 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._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);
            if (null != this._zone)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                foreach (var __x in this._zone)
                {
                    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("zones", __w);
            }
            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="DatabaseStatistics" /> 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="DatabaseStatistics" /> 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._size ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNumber((float)this._size) : null, "size", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Serializes this instance of <see cref="OperationListResult" /> 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="OperationListResult" /> 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 (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);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ErrorAdditionalInfo" /> 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="ErrorAdditionalInfo" /> 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._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);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._info.ToJson(null, serializationMode) : null, "info", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <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);
        }
Ejemplo n.º 15
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="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.º 18
0
        /// <summary>
        /// Serializes this instance of <see cref="TrackedResource" /> 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="TrackedResource" /> 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);
            AddIf(null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) this._tag.ToJson(null, serializationMode) : null, "tags", 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);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Serializes this instance of <see cref="AzureCapacity" /> 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="AzureCapacity" /> 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._scaleType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._scaleType.ToString()) : null, "scaleType", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNumber(this._minimum), "minimum", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNumber(this._maximum), "maximum", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNumber(this._default), "default", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Serializes this instance of <see cref="OperationDisplay" /> 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="OperationDisplay" /> 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._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider", container.Add);
            AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add);
            AddIf(null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource", container.Add);
            AddIf(null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 21
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);
        }
        /// <summary>
        /// Serializes this instance of <see cref="TrackedResourceTags" /> 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="TrackedResourceTags" /> 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);
            }
            Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 23
0
        /// <summary>
        /// Serializes this instance of <see cref="OptimizedAutoscale" /> 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="OptimizedAutoscale" /> 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((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNumber(this._version), "version", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonBoolean(this._isEnabled), "isEnabled", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNumber(this._minimum), "minimum", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNumber(this._maximum), "maximum", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 24
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);
        }
        /// <summary>
        /// Serializes this instance of <see cref="TableLevelSharingProperties" /> 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="TableLevelSharingProperties" /> 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 (null != this._tablesToInclude)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                foreach (var __x in this._tablesToInclude)
                {
                    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("tablesToInclude", __w);
            }
            if (null != this._tablesToExclude)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                foreach (var __s in this._tablesToExclude)
                {
                    AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add);
                }
                container.Add("tablesToExclude", __r);
            }
            if (null != this._externalTablesToInclude)
            {
                var __m = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                foreach (var __n in this._externalTablesToInclude)
                {
                    AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(__n.ToString()) : null, __m.Add);
                }
                container.Add("externalTablesToInclude", __m);
            }
            if (null != this._externalTablesToExclude)
            {
                var __h = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                foreach (var __i in this._externalTablesToExclude)
                {
                    AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(__i.ToString()) : null, __h.Add);
                }
                container.Add("externalTablesToExclude", __h);
            }
            if (null != this._materializedViewsToInclude)
            {
                var __c = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                foreach (var __d in this._materializedViewsToInclude)
                {
                    AddIf(null != (((object)__d)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(__d.ToString()) : null, __c.Add);
                }
                container.Add("materializedViewsToInclude", __c);
            }
            if (null != this._materializedViewsToExclude)
            {
                var ___x = new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.XNodeArray();
                foreach (var ___y in this._materializedViewsToExclude)
                {
                    AddIf(null != (((object)___y)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Synapse.Runtime.Json.JsonString(___y.ToString()) : null, ___x.Add);
                }
                container.Add("materializedViewsToExclude", ___x);
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 26
0
        /// <summary>
        /// Serializes this instance of <see cref="DatabaseCheckNameRequest" /> 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="DatabaseCheckNameRequest" /> 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._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);
            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.º 27
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);
        }