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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (null != this._stopSellNotification)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __x in this._stopSellNotification)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("stopSellNotifications", __w);
            }
            if (null != this._newNotification)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __s in this._newNotification)
                {
                    AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                }
                container.Add("newNotifications", __r);
            }
            if (null != this._approvalRequest)
            {
                var __m = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __n in this._approvalRequest)
                {
                    AddIf(__n?.ToJson(null, serializationMode), __m.Add);
                }
                container.Add("approvalRequests", __m);
            }
            AfterToJson(ref container);
            return(container);
        }
예제 #2
0
        /// <summary>
        /// Serializes this instance of <see cref="Recipient" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Recipient" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._emailAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._emailAddress.ToString()) : null, "emailAddress", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
예제 #3
0
        /// <summary>
        /// Serializes this instance of <see cref="SingleOperationDisplay" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="SingleOperationDisplay" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
예제 #4
0
        /// <summary>
        /// Serializes this instance of <see cref="QueryApprovedPlansDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="QueryApprovedPlansDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._planId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._planId.ToString()) : null, "planId", container.Add);
            if (null != this._subscriptionId)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __x in this._subscriptionId)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("subscriptionIds", __w);
            }
            AddIf(null != this._allSubscription ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._allSubscription) : null, "allSubscriptions", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="RequestApprovalsList" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="RequestApprovalsList" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.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.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
예제 #6
0
        /// <summary>
        /// Serializes this instance of <see cref="StopSellNotifications" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="StopSellNotifications" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._offerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._offerId.ToString()) : null, "offerId", container.Add);
            AddIf(null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName", container.Add);
            AddIf(null != this._isEntire ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._isEntire) : null, "isEntire", container.Add);
            AddIf(null != this._messageCode ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNumber((long)this._messageCode) : null, "messageCode", container.Add);
            AddIf(null != (((object)this._icon)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._icon.ToString()) : null, "icon", container.Add);
            if (null != this._plan)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __x in this._plan)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("plans", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
예제 #7
0
        /// <summary>
        /// Serializes this instance of <see cref="TransferOffersResponse" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="TransferOffersResponse" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (null != this._succeeded)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __x in this._succeeded)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("succeeded", __w);
            }
            if (null != this._failed)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __s in this._failed)
                {
                    AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                }
                container.Add("failed", __r);
            }
            AfterToJson(ref container);
            return(container);
        }
예제 #8
0
        /// <summary>
        /// Serializes this instance of <see cref="Any" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Any" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (null != this._recipient)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __x in this._recipient)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("recipients", __w);
            }
            AddIf(null != this._sendToAllMarketplaceAdmin ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._sendToAllMarketplaceAdmin) : null, "sendToAllMarketplaceAdmins", container.Add);
            AfterToJson(ref container);
            return(container);
        }
예제 #10
0
        /// <summary>
        /// Serializes this instance of <see cref="AcknowledgeOfferNotificationDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AcknowledgeOfferNotificationDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._acknowledge ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._acknowledge) : null, "acknowledge", container.Add);
            AddIf(null != this._dismiss ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._dismiss) : null, "dismiss", container.Add);
            AddIf(null != this._removeOffer ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._removeOffer) : null, "removeOffer", container.Add);
            if (null != this._addPlan)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __x in this._addPlan)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("addPlans", __w);
            }
            if (null != this._removePlan)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __s in this._removePlan)
                {
                    AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add);
                }
                container.Add("removePlans", __r);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="TransferOffersDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="TransferOffersDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._uniqueOfferId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._uniqueOfferId.ToString()) : null, "uniqueOfferId", container.Add);
            AddIf(null != this._plansDetail ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) this._plansDetail.ToJson(null, serializationMode) : null, "plansDetails", container.Add);
            AddIf(null != (((object)this._etag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._etag.ToString()) : null, "etag", container.Add);
            AddIf(null != this._messageCode ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNumber((long)this._messageCode) : null, "messageCode", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="OfferProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="OfferProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._uniqueOfferId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._uniqueOfferId.ToString()) : null, "uniqueOfferId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._offerDisplayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._offerDisplayName.ToString()) : null, "offerDisplayName", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._publisherDisplayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._publisherDisplayName.ToString()) : null, "publisherDisplayName", container.Add);
            }
            AddIf(null != (((object)this._eTag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._eTag.ToString()) : null, "eTag", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._privateStoreId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._privateStoreId.ToString()) : null, "privateStoreId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._createdAt)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._createdAt.ToString()) : null, "createdAt", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._modifiedAt)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._modifiedAt.ToString()) : null, "modifiedAt", container.Add);
            }
            if (null != this._specificPlanIdsLimitation)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __x in this._specificPlanIdsLimitation)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("specificPlanIdsLimitation", __w);
            }
            AddIf(null != this._updateSuppressedDueIdempotence ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._updateSuppressedDueIdempotence) : null, "updateSuppressedDueIdempotence", container.Add);
            AddIf(null != this._iconFileUri ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) this._iconFileUri.ToJson(null, serializationMode) : null, "iconFileUris", container.Add);
            if (null != this._plan)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __s in this._plan)
                {
                    AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                }
                container.Add("plans", __r);
            }
            AfterToJson(ref container);
            return(container);
        }
예제 #14
0
        /// <summary>
        /// Serializes this instance of <see cref="SystemData" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="SystemData" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy", container.Add);
            AddIf(null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType", container.Add);
            AddIf(null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy", container.Add);
            AddIf(null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType", container.Add);
            AddIf(null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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);
        }
예제 #15
0
        /// <summary>
        /// Serializes this instance of <see cref="CollectionsToSubscriptionsMappingResponseProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="CollectionsToSubscriptionsMappingResponseProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode"
        /// />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.IAssociativeArray <Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Models.Api20210601.ICollectionsSubscriptionsMappingDetails>) this).AdditionalProperties, container);
            AfterToJson(ref container);
            return(container);
        }
예제 #16
0
        /// <summary>
        /// Serializes this instance of <see cref="Plan" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Plan" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._skuId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._skuId.ToString()) : null, "skuId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._id.ToString()) : null, "planId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._displayName.ToString()) : null, "planDisplayName", container.Add);
            }
            AddIf(null != (((object)this._accessibility)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._accessibility.ToString()) : null, "accessibility", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._altStackReference)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._altStackReference.ToString()) : null, "altStackReference", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._stackType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._stackType.ToString()) : null, "stackType", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
예제 #17
0
        /// <summary>
        /// Serializes this instance of <see cref="Resource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Resource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._notificationsSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) this._notificationsSetting.ToJson(null, serializationMode) : null, "notificationsSettings", container.Add);
            AddIf(null != (((object)this._availability)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._availability.ToString()) : null, "availability", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._privateStoreId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._privateStoreId.ToString()) : null, "privateStoreId", container.Add);
            }
            AddIf(null != (((object)this._eTag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._eTag.ToString()) : null, "eTag", container.Add);
            AddIf(null != (((object)this._privateStoreName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._privateStoreName.ToString()) : null, "privateStoreName", container.Add);
            AddIf(null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId", container.Add);
            AddIf(null != this._isGov ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._isGov) : null, "isGov", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._collectionId)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                    foreach (var __x in this._collectionId)
                    {
                        AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                    }
                    container.Add("collectionIds", __w);
                }
            }
            AddIf(null != this._branding ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) this._branding.ToJson(null, serializationMode) : null, "branding", container.Add);
            AfterToJson(ref container);
            return(container);
        }
예제 #19
0
        /// <summary>
        /// Serializes this instance of <see cref="PlanDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PlanDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._planId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._planId.ToString()) : null, "planId", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._status.ToString()) : null, "status", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._requestDate ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) this._requestDate.ToJson(null, serializationMode) : null, "requestDate", container.Add);
            }
            AddIf(null != (((object)this._justification)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._justification.ToString()) : null, "justification", container.Add);
            AddIf(null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId", container.Add);
            AddIf(null != (((object)this._subscriptionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._subscriptionName.ToString()) : null, "subscriptionName", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="BillingAccountsResponse" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="BillingAccountsResponse" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

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

            bool returnNow = false;

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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._privateStoreId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._privateStoreId.ToString()) : null, "privateStoreId", container.Add);
            AddIf(null != (((object)this._requestApprovalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._requestApprovalId.ToString()) : null, "requestApprovalId", container.Add);
            AddIf(null != (((object)this._adminRequestApprovalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._adminRequestApprovalId.ToString()) : null, "adminRequestApprovalId", container.Add);
            AddIf(null != (((object)this._offerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._offerId.ToString()) : null, "offerId", container.Add);
            AddIf(null != (((object)this._collectionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._collectionId.ToString()) : null, "collectionId", container.Add);
            AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="PlanNotificationDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PlanNotificationDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._planId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._planId.ToString()) : null, "planId", container.Add);
            AddIf(null != (((object)this._planDisplayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._planDisplayName.ToString()) : null, "planDisplayName", container.Add);
            AfterToJson(ref container);
            return(container);
        }
예제 #24
0
        /// <summary>
        /// Serializes this instance of <see cref="SingleOperation" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="SingleOperation" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) this._display.ToJson(null, serializationMode) : null, "display", container.Add);
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AddIf(null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction", container.Add);
            AddIf(null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin", container.Add);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="AdminRequestApprovalProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AdminRequestApprovalProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._offerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._offerId.ToString()) : null, "offerId", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName", container.Add);
            }
            AddIf(null != (((object)this._publisherId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._publisherId.ToString()) : null, "publisherId", container.Add);
            AddIf(null != (((object)this._adminAction)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._adminAction.ToString()) : null, "adminAction", container.Add);
            if (null != this._approvedPlan)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __x in this._approvedPlan)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("approvedPlans", __w);
            }
            AddIf(null != (((object)this._comment)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._comment.ToString()) : null, "comment", container.Add);
            AddIf(null != (((object)this._administrator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._administrator.ToString()) : null, "administrator", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._plan)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                    foreach (var __s in this._plan)
                    {
                        AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                    }
                    container.Add("plans", __r);
                }
            }
            if (null != this._collectionId)
            {
                var __m = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __n in this._collectionId)
                {
                    AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(__n.ToString()) : null, __m.Add);
                }
                container.Add("collectionIds", __m);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="CollectionProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.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.Marketplace.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="CollectionProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._collectionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._collectionId.ToString()) : null, "collectionId", container.Add);
            }
            AddIf(null != (((object)this._collectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._collectionName.ToString()) : null, "collectionName", container.Add);
            AddIf(null != (((object)this._claim)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(this._claim.ToString()) : null, "claim", container.Add);
            AddIf(null != this._allSubscription ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._allSubscription) : null, "allSubscriptions", container.Add);
            if (null != this._subscriptionsList)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.XNodeArray();
                foreach (var __x in this._subscriptionsList)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("subscriptionsList", __w);
            }
            AddIf(null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._numberOfOffer ? (Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Marketplace.Runtime.Json.JsonNumber((long)this._numberOfOffer) : null, "numberOfOffers", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }