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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._contactName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._contactName.ToString()) : null, "contactName", container.Add);
            AddIf(null != (((object)this._phone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._phone.ToString()) : null, "phone", container.Add);
            AddIf(null != (((object)this._phoneExtension)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._phoneExtension.ToString()) : null, "phoneExtension", container.Add);
            AddIf(null != (((object)this._mobile)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._mobile.ToString()) : null, "mobile", container.Add);
            if (null != this._emailList)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                foreach (var __x in this._emailList)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("emailList", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
示例#2
0
        /// <summary>
        /// Serializes this instance of <see cref="Preferences" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Preferences" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (null != this._notificationPreference)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                foreach (var __x in this._notificationPreference)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("notificationPreferences", __w);
            }
            AddIf(null != this._transportPreference ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._transportPreference.ToJson(null, serializationMode) : null, "transportPreferences", container.Add);
            AddIf(null != this._encryptionPreference ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._encryptionPreference.ToJson(null, serializationMode) : null, "encryptionPreferences", container.Add);
            AddIf(null != this._managementResourcePreference ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._managementResourcePreference.ToJson(null, serializationMode) : null, "managementResourcePreferences", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#3
0
        /// <summary>
        /// Serializes this instance of <see cref="ProductFamiliesMetadata" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ProductFamiliesMetadata" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._value)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="OrderItemUpdateProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="OrderItemUpdateProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._forwardAddress ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._forwardAddress.ToJson(null, serializationMode) : null, "forwardAddress", container.Add);
            AddIf(null != this._preference ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._preference.ToJson(null, serializationMode) : null, "preferences", container.Add);
            if (null != this._notificationEmailList)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                foreach (var __x in this._notificationEmailList)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("notificationEmailList", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
示例#5
0
        /// <summary>
        /// Serializes this instance of <see cref="CustomerSubscriptionDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="CustomerSubscriptionDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (null != this._registeredFeature)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                foreach (var __x in this._registeredFeature)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("registeredFeatures", __w);
            }
            AddIf(null != (((object)this._locationPlacementId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._locationPlacementId.ToString()) : null, "locationPlacementId", container.Add);
            AddIf(null != (((object)this._quotaId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._quotaId.ToString()) : null, "quotaId", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ConfigurationProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ConfigurationProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __commonProperties?.ToJson(container, serializationMode);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._dimension ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._dimension.ToJson(null, serializationMode) : null, "dimensions", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._specification)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __x in this._specification)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("specifications", __w);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
示例#7
0
        /// <summary>
        /// Serializes this instance of <see cref="CommonProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="CommonProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

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

            bool returnNow = false;

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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._description ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._description.ToJson(null, serializationMode) : null, "description", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._costInformation ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._costInformation.ToJson(null, serializationMode) : null, "costInformation", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._availabilityInformation ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._availabilityInformation.ToJson(null, serializationMode) : null, "availabilityInformation", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._imageInformation)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __x in this._imageInformation)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("imageInformation", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._hierarchyInformation ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._hierarchyInformation.ToJson(null, serializationMode) : null, "hierarchyInformation", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="OrderProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="OrderProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._currentStage ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._currentStage.ToJson(null, serializationMode) : null, "currentStage", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._orderItemId)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __x in this._orderItemId)
                    {
                        AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                    }
                    container.Add("orderItemIds", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._orderStageHistory)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __s in this._orderStageHistory)
                    {
                        AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                    }
                    container.Add("orderStageHistory", __r);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
示例#11
0
        /// <summary>
        /// Serializes this instance of <see cref="ProductFamilyProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ProductFamilyProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __commonProperties?.ToJson(container, serializationMode);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._productLine)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __x in this._productLine)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("productLines", __w);
                }
            }
            if (null != this._resourceProviderDetail)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                foreach (var __s in this._resourceProviderDetail)
                {
                    AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                }
                container.Add("resourceProviderDetails", __r);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ConfigurationFilters" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ConfigurationFilters" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._hierarchyInformation ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._hierarchyInformation.ToJson(null, serializationMode) : null, "hierarchyInformation", container.Add);
            if (null != this._filterableProperty)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                foreach (var __x in this._filterableProperty)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("filterableProperty", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ConfigurationsRequest" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ConfigurationsRequest" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (null != this._configurationFilter)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                foreach (var __x in this._configurationFilter)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("configurationFilters", __w);
            }
            AddIf(null != this._customerSubscriptionDetail ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._customerSubscriptionDetail.ToJson(null, serializationMode) : null, "customerSubscriptionDetails", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#14
0
        /// <summary>
        /// Serializes this instance of <see cref="ProductDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ProductDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._displayInfo ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._displayInfo.ToJson(null, serializationMode) : null, "displayInfo", container.Add);
            AddIf(null != this._hierarchyInformation ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._hierarchyInformation.ToJson(null, serializationMode) : null, "hierarchyInformation", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._count ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNumber((int)this._count) : null, "count", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._productDoubleEncryptionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._productDoubleEncryptionStatus.ToString()) : null, "productDoubleEncryptionStatus", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._deviceDetail)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __x in this._deviceDetail)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("deviceDetails", __w);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="FilterableProperty" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="FilterableProperty" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add);
            if (null != this._supportedValue)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                foreach (var __x in this._supportedValue)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("supportedValues", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="OrderItemDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="OrderItemDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._productDetail ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._productDetail.ToJson(null, serializationMode) : null, "productDetails", container.Add);
            AddIf(null != (((object)this._orderItemType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._orderItemType.ToString()) : null, "orderItemType", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._currentStage ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._currentStage.ToJson(null, serializationMode) : null, "currentStage", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._orderItemStageHistory)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __x in this._orderItemStageHistory)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("orderItemStageHistory", __w);
                }
            }
            AddIf(null != this._preference ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._preference.ToJson(null, serializationMode) : null, "preferences", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._forwardShippingDetail ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._forwardShippingDetail.ToJson(null, serializationMode) : null, "forwardShippingDetails", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._reverseShippingDetail ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._reverseShippingDetail.ToJson(null, serializationMode) : null, "reverseShippingDetails", container.Add);
            }
            if (null != this._notificationEmailList)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                foreach (var __s in this._notificationEmailList)
                {
                    AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add);
                }
                container.Add("notificationEmailList", __r);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._cancellationReason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._cancellationReason.ToString()) : null, "cancellationReason", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._cancellationStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._cancellationStatus.ToString()) : null, "cancellationStatus", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._deletionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._deletionStatus.ToString()) : null, "deletionStatus", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._returnReason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._returnReason.ToString()) : null, "returnReason", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._returnStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._returnStatus.ToString()) : null, "returnStatus", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._managementRpDetail ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._managementRpDetail.ToJson(null, serializationMode) : null, "managementRpDetails", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._managementRpDetailsList)
                {
                    var __m = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __n in this._managementRpDetailsList)
                    {
                        AddIf(__n?.ToJson(null, serializationMode), __m.Add);
                    }
                    container.Add("managementRpDetailsList", __m);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) this._error.ToJson(null, serializationMode) : null, "error", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
示例#17
0
        /// <summary>
        /// Serializes this instance of <see cref="Description" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.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.EdgeOrder.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Description" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._type.ToString()) : null, "descriptionType", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._shortDescription)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._shortDescription.ToString()) : null, "shortDescription", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._longDescription)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(this._longDescription.ToString()) : null, "longDescription", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._keyword)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __x in this._keyword)
                    {
                        AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                    }
                    container.Add("keywords", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._attribute)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __s in this._attribute)
                    {
                        AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add);
                    }
                    container.Add("attributes", __r);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._link)
                {
                    var __m = new Microsoft.Azure.PowerShell.Cmdlets.EdgeOrder.Runtime.Json.XNodeArray();
                    foreach (var __n in this._link)
                    {
                        AddIf(__n?.ToJson(null, serializationMode), __m.Add);
                    }
                    container.Add("links", __m);
                }
            }
            AfterToJson(ref container);
            return(container);
        }