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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._configurationSetting ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) this._configurationSetting.ToJson(null, serializationMode) : null, "configurationSetting", container.Add);
            }
            AddIf(null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind", container.Add);
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AddIf(null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._version.ToString()) : null, "version", container.Add);
            AddIf(null != (((object)this._contentUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._contentUri.ToString()) : null, "contentUri", container.Add);
            AddIf(null != (((object)this._contentHash)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._contentHash.ToString()) : null, "contentHash", container.Add);
            AddIf(null != (((object)this._assignmentType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._assignmentType.ToString()) : null, "assignmentType", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._assignmentSource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._assignmentSource.ToString()) : null, "assignmentSource", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._contentType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._contentType.ToString()) : null, "contentType", container.Add);
            }
            if (null != this._configurationParameter)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.XNodeArray();
                foreach (var __x in this._configurationParameter)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("configurationParameter", __w);
            }
            if (null != this._configurationProtectedParameter)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.XNodeArray();
                foreach (var __s in this._configurationProtectedParameter)
                {
                    AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                }
                container.Add("configurationProtectedParameter", __r);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="AssignmentReportResource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.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.GuestConfiguration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AssignmentReportResource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._complianceStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._complianceStatus.ToString()) : null, "complianceStatus", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId", container.Add);
            }
            if (null != this._reason)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.XNodeArray();
                foreach (var __x in this._reason)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("reasons", __w);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
Example #3
0
        /// <summary>
        /// Serializes this instance of <see cref="GuestConfigurationAssignmentProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.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.GuestConfiguration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="GuestConfigurationAssignmentProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._guestConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) this._guestConfiguration.ToJson(null, serializationMode) : null, "guestConfiguration", container.Add);
            AddIf(null != this._latestAssignmentReport ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) this._latestAssignmentReport.ToJson(null, serializationMode) : null, "latestAssignmentReport", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._targetResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._targetResourceId.ToString()) : null, "targetResourceId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._complianceStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._complianceStatus.ToString()) : null, "complianceStatus", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._lastComplianceStatusChecked ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._lastComplianceStatusChecked?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastComplianceStatusChecked", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._latestReportId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._latestReportId.ToString()) : null, "latestReportId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._parameterHash)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._parameterHash.ToString()) : null, "parameterHash", container.Add);
            }
            AddIf(null != (((object)this._context)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._context.ToString()) : null, "context", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._assignmentHash)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._assignmentHash.ToString()) : null, "assignmentHash", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType", container.Add);
            }
            if (null != this._vmssVMList)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.XNodeArray();
                foreach (var __x in this._vmssVMList)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("vmssVMList", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
Example #4
0
        /// <summary>
        /// Serializes this instance of <see cref="AssignmentReport" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.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.GuestConfiguration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AssignmentReport" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._assignment ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) this._assignment.ToJson(null, serializationMode) : null, "assignment", container.Add);
            AddIf(null != this._vM ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) this._vM.ToJson(null, serializationMode) : null, "vm", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._reportId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._reportId.ToString()) : null, "reportId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._complianceStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._complianceStatus.ToString()) : null, "complianceStatus", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._operationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonString(this._operationType.ToString()) : null, "operationType", container.Add);
            }
            if (null != this._resource)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.XNodeArray();
                foreach (var __x in this._resource)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("resources", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
Example #5
0
        /// <summary>
        /// Serializes this instance of <see cref="GuestConfigurationAssignmentList" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.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.GuestConfiguration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="GuestConfigurationAssignmentList" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.GuestConfiguration.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.GuestConfiguration.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);
        }