/// <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); }
/// <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); }
/// <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="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="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); }
/// <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="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); }
/// <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); }
/// <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="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); }
/// <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="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); }
/// <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); }