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

            bool returnNow = false;
            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return container;
            }
            AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
            AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add );
            AddIf( null != (((object)this._displayDescription)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._displayDescription.ToString()) : null, "displayDescription" ,container.Add );
            AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add );
            if (null != this._dimension)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.XNodeArray();
                foreach( var __x in this._dimension )
                {
                    AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
                }
                container.Add("dimensions",__w);
            }
            AddIf( null != (((object)this._aggregationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._aggregationType.ToString()) : null, "aggregationType" ,container.Add );
            AddIf( null != this._fillGapWithZero ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonBoolean((bool)this._fillGapWithZero) : null, "fillGapWithZero" ,container.Add );
            AddIf( null != (((object)this._category)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._category.ToString()) : null, "category" ,container.Add );
            AddIf( null != (((object)this._resourceIdDimensionNameOverride)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._resourceIdDimensionNameOverride.ToString()) : null, "resourceIdDimensionNameOverride" ,container.Add );
            AfterToJson(ref container);
            return container;
        }
コード例 #2
0
        /// <summary>
        /// Serializes this instance of <see cref="Resource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.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.Maps.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Resource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject();

            bool returnNow = false;

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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._value)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.XNodeArray();
                    foreach (var __x in this._value)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("value", __w);
                }
            }
            AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #4
0
ファイル: Any.json.cs プロジェクト: pixia/azure-powershell
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="Any" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Any(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            AfterFromJson(json);
        }
コード例 #5
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="ErrorResponse" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error; }
            AfterFromJson(json);
        }
コード例 #6
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="OperationProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationProperties(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _serviceSpecification = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("serviceSpecification"), out var __jsonServiceSpecification) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.ServiceSpecification.FromJson(__jsonServiceSpecification) : ServiceSpecification; }
            AfterFromJson(json);
        }
コード例 #7
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="ServiceSpecification" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ServiceSpecification(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _metricSpecification = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonArray>("metricSpecifications"), out var __jsonMetricSpecifications) ? If(__jsonMetricSpecifications as Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.IMetricSpecification[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.IMetricSpecification)(Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.MetricSpecification.FromJson(__u)))))() : null : MetricSpecification; }
            AfterFromJson(json);
        }
コード例 #8
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="MapsKeySpecification" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal MapsKeySpecification(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _keyType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("keyType"), out var __jsonKeyType) ? (string)__jsonKeyType : (string)KeyType; }
            AfterFromJson(json);
        }
コード例 #9
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="TrackedResourceTags" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        /// <param name="exclusions"></param>
        internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.Maps.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.Maps.Runtime.JsonSerializable.FromJson(json, ((Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.IAssociativeArray <string>) this).AdditionalProperties, null, exclusions);
            AfterFromJson(json);
        }
コード例 #10
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="Creator" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Creator(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.TrackedResource(json);
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.CreatorProperties.FromJson(__jsonProperties) : Property; }
            AfterFromJson(json);
        }
コード例 #11
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="CreatorList" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CreatorList(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.ICreator[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.ICreator)(Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.Creator.FromJson(__u)))))() : null : Value; }
            { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; }
            AfterFromJson(json);
        }
コード例 #12
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="Sku" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Sku(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _tier = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("tier"), out var __jsonTier) ? (string)__jsonTier : (string)Tier; }
            AfterFromJson(json);
        }
コード例 #13
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="CreatorProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CreatorProperties(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            { _storageUnit = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNumber>("storageUnits"), out var __jsonStorageUnits) ? (int)__jsonStorageUnits : StorageUnit; }
            AfterFromJson(json);
        }
コード例 #14
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="ErrorAdditionalInfo" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _info = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Any.FromJson(__jsonInfo) : Info; }
            AfterFromJson(json);
        }
コード例 #15
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="CreatorUpdateParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CreatorUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.CreatorProperties.FromJson(__jsonProperties) : Property; }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.CreatorUpdateParametersTags.FromJson(__jsonTags) : Tag; }
            AfterFromJson(json);
        }
コード例 #16
0
ファイル: Any.json.cs プロジェクト: pixia/azure-powershell
        /// <summary>
        /// Serializes this instance of <see cref="Any" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.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.Maps.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Any" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #17
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="Resource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Resource(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            AfterFromJson(json);
        }
コード例 #18
0
        /// <summary>
        /// Serializes this instance of <see cref="ErrorDetail" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.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.Maps.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ErrorDetail" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString(this._target.ToString()) : null, "target", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._detail)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.XNodeArray();
                    foreach (var __x in this._detail)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("details", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._additionalInfo)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.XNodeArray();
                    foreach (var __s in this._additionalInfo)
                    {
                        AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                    }
                    container.Add("additionalInfo", __r);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #19
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="TrackedResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __resource = new Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.Resource(json);
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.TrackedResourceTags.FromJson(__jsonTags) : Tag; }
            { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; }
            AfterFromJson(json);
        }
コード例 #20
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="MapsAccountProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal MapsAccountProperties(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _uniqueId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("uniqueId"), out var __jsonUniqueId) ? (string)__jsonUniqueId : (string)UniqueId; }
            { _disableLocalAuth = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonBoolean>("disableLocalAuth"), out var __jsonDisableLocalAuth) ? (bool?)__jsonDisableLocalAuth : DisableLocalAuth; }
            { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; }
            AfterFromJson(json);
        }
コード例 #21
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="MapsAccountKeys" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal MapsAccountKeys(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _primaryKeyLastUpdated = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("primaryKeyLastUpdated"), out var __jsonPrimaryKeyLastUpdated) ? (string)__jsonPrimaryKeyLastUpdated : (string)PrimaryKeyLastUpdated; }
            { _primaryKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("primaryKey"), out var __jsonPrimaryKey) ? (string)__jsonPrimaryKey : (string)PrimaryKey; }
            { _secondaryKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("secondaryKey"), out var __jsonSecondaryKey) ? (string)__jsonSecondaryKey : (string)SecondaryKey; }
            { _secondaryKeyLastUpdated = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("secondaryKeyLastUpdated"), out var __jsonSecondaryKeyLastUpdated) ? (string)__jsonSecondaryKeyLastUpdated : (string)SecondaryKeyLastUpdated; }
            AfterFromJson(json);
        }
コード例 #22
0
        /// <summary>
        /// Serializes this instance of <see cref="TrackedResourceTags" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.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.Maps.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="TrackedResourceTags" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject();

            bool returnNow = false;

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

            bool returnNow = false;

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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) this._error.ToJson(null, serializationMode) : null, "error", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #25
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="MapsAccountUpdateParameters" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal MapsAccountUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.Sku.FromJson(__jsonSku) : Sku; }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.MapsAccountProperties.FromJson(__jsonProperties) : Property; }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.MapsAccountUpdateParametersTags.FromJson(__jsonTags) : Tag; }
            { _kind = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind; }
            AfterFromJson(json);
        }
コード例 #26
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="OperationDisplay" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.TrackedResource(json);
            { _sku = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.Sku.FromJson(__jsonSku) : Sku; }
            { _systemData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData; }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.MapsAccountProperties.FromJson(__jsonProperties) : Property; }
            { _kind = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind; }
            AfterFromJson(json);
        }
コード例 #28
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="ErrorDetail" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; }
            { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; }
            { _target = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target; }
            { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonArray>("details"), out var __jsonDetails) ? If(__jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.IErrorDetail[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.IErrorDetail)(Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.ErrorDetail.FromJson(__u)))))() : null : Detail; }
            { _additionalInfo = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonArray>("additionalInfo"), out var __jsonAdditionalInfo) ? If(__jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.IErrorAdditionalInfo[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.IErrorAdditionalInfo)(Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20.ErrorAdditionalInfo.FromJson(__p)))))() : null : AdditionalInfo; }
            AfterFromJson(json);
        }
コード例 #29
0
        /// <summary>
        /// Serializes this instance of <see cref="Creator" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.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.Maps.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Creator" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __trackedResource?.ToJson(container, serializationMode);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #30
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject into a new instance of <see cref="OperationDetail" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationDetail(Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.OperationDisplay.FromJson(__jsonDisplay) : Display; }
            { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.OperationProperties.FromJson(__jsonProperties) : Property; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _isDataAction = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonBoolean>("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction; }
            { _origin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.Maps.Runtime.Json.JsonString>("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin; }
            AfterFromJson(json);
        }