partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
 {
     // Perform serialization using the appropriate item instantiator
     Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.JsonSerializable.FromJson(
         json,
         ((Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.IAssociativeArray <Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.IDashboardLens>) this).AdditionalProperties,
         (js) => Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardLens.FromJson(js),
         null);
 }
Пример #2
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="ErrorResponse" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.ErrorDefinition.FromJson(__jsonError) : Error; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="DashboardPropertiesMetadata" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        /// <param name="exclusions"></param>
        internal DashboardPropertiesMetadata(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet <string> exclusions = null)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.JsonSerializable.FromJson(json, ((Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.IAssociativeArray <global::System.Object>) this).AdditionalProperties, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.JsonSerializable.DeserializeDictionary(() => new global::System.Collections.Generic.Dictionary <global::System.String, global::System.Object>()), exclusions);
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="PatchableDashboardTags" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        /// <param name="exclusions"></param>
        internal PatchableDashboardTags(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet <string> exclusions = null)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.JsonSerializable.FromJson(json, ((Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.IAssociativeArray <string>) this).AdditionalProperties, null, exclusions);
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="DashboardParts" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DashboardParts(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _position = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("position"), out var __jsonPosition) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardPartsPosition.FromJson(__jsonPosition) : Position; }
            { _metadata = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("metadata"), out var __jsonMetadata) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardPartsMetadata.FromJson(__jsonMetadata) : Metadata; }
            AfterFromJson(json);
        }
Пример #6
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="PatchableDashboard" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal PatchableDashboard(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardProperties.FromJson(__jsonProperties) : Property; }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.PatchableDashboardTags.FromJson(__jsonTags) : Tag; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="DashboardProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DashboardProperties(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _lens = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("lenses"), out var __jsonLenses) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardPropertiesLenses.FromJson(__jsonLenses) : Lens; }
            { _metadata = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("metadata"), out var __jsonMetadata) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardPropertiesMetadata.FromJson(__jsonMetadata) : Metadata; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="DashboardListResult" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DashboardListResult(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.IDashboard[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.IDashboard)(Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.Dashboard.FromJson(__u)))))() : null : Value; }
            AfterFromJson(json);
        }
Пример #9
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="DashboardLens" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DashboardLens(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _metadata = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("metadata"), out var __jsonMetadata) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardLensMetadata.FromJson(__jsonMetadata) : Metadata; }
            { _order = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNumber>("order"), out var __jsonOrder) ? (int)__jsonOrder : Order; }
            { _part = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("parts"), out var __jsonParts) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardLensParts.FromJson(__jsonParts) : Part; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="ErrorDefinition" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorDefinition(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; }
            { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; }
            { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonArray>("details"), out var __jsonDetails) ? If(__jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.IErrorDefinition[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.IErrorDefinition)(Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.ErrorDefinition.FromJson(__u)))))() : null : Detail; }
            AfterFromJson(json);
        }
Пример #11
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="ResourceProviderOperation" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ResourceProviderOperation(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.ResourceProviderOperationDisplay.FromJson(__jsonDisplay) : Display; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _isDataAction = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("isDataAction"), out var __jsonIsDataAction) ? (string)__jsonIsDataAction : (string)IsDataAction; }
            AfterFromJson(json);
        }
Пример #12
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="PortalIdentity" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal PortalIdentity(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _dashboardName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("dashboardName"), out var __jsonDashboardName) ? (string)__jsonDashboardName : (string)DashboardName; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; }
            { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; }
            AfterFromJson(json);
        }
Пример #13
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="ResourceProviderOperationDisplay" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ResourceProviderOperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; }
            { _operation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation; }
            { _provider = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider; }
            { _resource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource; }
            AfterFromJson(json);
        }
Пример #14
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="DashboardPartsPosition" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DashboardPartsPosition(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _colSpan = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNumber>("colSpan"), out var __jsonColSpan) ? (int)__jsonColSpan : ColSpan; }
            { _metadata = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("metadata"), out var __jsonMetadata) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardPartsPositionMetadata.FromJson(__jsonMetadata) : Metadata; }
            { _rowSpan = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNumber>("rowSpan"), out var __jsonRowSpan) ? (int)__jsonRowSpan : RowSpan; }
            { _x = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNumber>("x"), out var __jsonX) ? (int)__jsonX : X; }
            { _y = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNumber>("y"), out var __jsonY) ? (int)__jsonY : Y; }
            AfterFromJson(json);
        }
Пример #15
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="Dashboard" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Dashboard(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardProperties.FromJson(__jsonProperties) : Property; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Portal.Models.Api201901Preview.DashboardTags.FromJson(__jsonTags) : Tag; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ErrorDefinition" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.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.Portal.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ErrorDefinition" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._detail)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.XNodeArray();
                    foreach (var __x in this._detail)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("details", __w);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
Пример #17
0
        /// <summary>
        /// Serializes this instance of <see cref="Components6Zowy1SchemasDashboardpartsPropertiesPositionPropertiesMetadataAdditionalproperties"
        /// /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.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.Portal.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Components6Zowy1SchemasDashboardpartsPropertiesPositionPropertiesMetadataAdditionalproperties"
        /// /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AfterToJson(ref container);
            return(container);
        }
Пример #18
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject into a new instance of <see cref="Components6Zowy1SchemasDashboardpartsPropertiesPositionPropertiesMetadataAdditionalproperties"
        /// />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Components6Zowy1SchemasDashboardpartsPropertiesPositionPropertiesMetadataAdditionalproperties(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            AfterFromJson(json);
        }
Пример #19
0
        /// <summary>
        /// Serializes this instance of <see cref="DashboardPartsPosition" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.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.Portal.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="DashboardPartsPosition" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNumber(this._colSpan), "colSpan", container.Add);
            AddIf(null != this._metadata ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) this._metadata.ToJson(null, serializationMode) : null, "metadata", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNumber(this._rowSpan), "rowSpan", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNumber(this._x), "x", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNumber(this._y), "y", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="DashboardListResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.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.Portal.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="DashboardListResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add);
            if (null != this._value)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.XNodeArray();
                foreach (var __x in this._value)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("value", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of
        /// the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="json">The JsonNode that should be deserialized into this object.</param>
        /// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json, ref bool returnNow);
        /// <summary>
        /// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object
        /// before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="json">The JsonNode that should be deserialized into this object.</param>

        partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject json);
Пример #23
0
        /// <summary>
        /// Serializes this instance of <see cref="ResourceProviderOperationDisplay" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.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.Portal.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ResourceProviderOperationDisplay" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject();

            bool returnNow = false;

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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            }
            AddIf(null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._location.ToString()) : null, "location", container.Add);
            AddIf(null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) this._tag.ToJson(null, serializationMode) : null, "tags", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject"
        /// /> before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>

        partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container);
Пример #26
0
        /// <summary>
        /// Serializes this instance of <see cref="ResourceProviderOperation" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.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.Portal.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ResourceProviderOperation" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) this._display.ToJson(null, serializationMode) : null, "display", container.Add);
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AddIf(null != (((object)this._isDataAction)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._isDataAction.ToString()) : null, "isDataAction", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
        /// object before it is serialized.
        /// If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, ref bool returnNow);
Пример #28
0
        /// <summary>
        /// Serializes this instance of <see cref="PortalIdentity" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.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.Portal.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PortalIdentity" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._dashboardName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._dashboardName.ToString()) : null, "dashboardName", container.Add);
            AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            AddIf(null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName", container.Add);
            AddIf(null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="PatchableDashboardTags" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.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.Portal.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PatchableDashboardTags" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container);
            AfterToJson(ref container);
            return(container);
        }
Пример #30
0
        /// <summary>
        /// Serializes this instance of <see cref="PatchableDashboard" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.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.Portal.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PatchableDashboard" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            AddIf(null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Portal.Runtime.Json.JsonNode) this._tag.ToJson(null, serializationMode) : null, "tags", container.Add);
            AfterToJson(ref container);
            return(container);
        }