Пример #1
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="QueryProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal QueryProperties(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; }
            { _column = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray>("columns"), out var __jsonColumns) ? If(__jsonColumns as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IQueryColumn[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IQueryColumn)(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.QueryColumn.FromJson(__u)))))() : null : Column; }
            { _row = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray>("rows"), out var __jsonRows) ? If(__jsonRows as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __p) ? new global::System.Func <string[][]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__p, (__o) => (string[])(If(__o as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __n) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__n, (__m) => (string)(__m is Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString __l ? (string)(__l.ToString()) : null))))() : null /* arrayOf */))))() : null : Row; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="OperationDisplay" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

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

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _resourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId; }
            { _container = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("container"), out var __jsonContainer) ? (string)__jsonContainer : (string)Container; }
            { _rootFolderPath = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("rootFolderPath"), out var __jsonRootFolderPath) ? (string)__jsonRootFolderPath : (string)RootFolderPath; }
            AfterFromJson(json);
        }
Пример #4
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="QueryComparisonExpression" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal QueryComparisonExpression(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _operator = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator; }
            { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray>("values"), out var __jsonValues) ? If(__jsonValues as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : Value; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="AlertPropertiesDefinition" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AlertPropertiesDefinition(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _category = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("category"), out var __jsonCategory) ? (string)__jsonCategory : (string)Category; }
            { _criterion = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("criteria"), out var __jsonCriteria) ? (string)__jsonCriteria : (string)Criterion; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="KpiProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal KpiProperties(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _enabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonBoolean>("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : Enabled; }
            AfterFromJson(json);
        }
Пример #7
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="ExportSchedule" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ExportSchedule(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _recurrencePeriod = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("recurrencePeriod"), out var __jsonRecurrencePeriod) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ExportRecurrencePeriod.FromJson(__jsonRecurrencePeriod) : RecurrencePeriod; }
            { _status = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status; }
            { _recurrence = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("recurrence"), out var __jsonRecurrence) ? (string)__jsonRecurrence : (string)Recurrence; }
            AfterFromJson(json);
        }
Пример #8
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="ForecastDataset" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ForecastDataset(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _configuration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("configuration"), out var __jsonConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.QueryDatasetConfiguration.FromJson(__jsonConfiguration) : Configuration; }
            { _aggregation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("aggregation"), out var __jsonAggregation) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ForecastDatasetAggregation.FromJson(__jsonAggregation) : Aggregation; }
            { _filter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("filter"), out var __jsonFilter) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.QueryFilter.FromJson(__jsonFilter) : Filter; }
            { _granularity = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("granularity"), out var __jsonGranularity) ? (string)__jsonGranularity : (string)Granularity; }
            AfterFromJson(json);
        }
Пример #9
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="Resource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal Resource(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ResourceTags.FromJson(__jsonTags) : Tag; }
            AfterFromJson(json);
        }
Пример #10
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="ProxyResource" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _eTag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("eTag"), out var __jsonETag) ? (string)__jsonETag : (string)ETag; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="ExportDefinition" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ExportDefinition(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _timePeriod = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("timePeriod"), out var __jsonTimePeriod) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ExportTimePeriod.FromJson(__jsonTimePeriod) : TimePeriod; }
            { _dataSet = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("dataSet"), out var __jsonDataSet) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ExportDataset.FromJson(__jsonDataSet) : DataSet; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _timeframe = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("timeframe"), out var __jsonTimeframe) ? (string)__jsonTimeframe : (string)Timeframe; }
            AfterFromJson(json);
        }
Пример #12
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="CommonExportProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CommonExportProperties(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _definition = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("definition"), out var __jsonDefinition) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ExportDefinition.FromJson(__jsonDefinition) : Definition; }
            { _deliveryInfo = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("deliveryInfo"), out var __jsonDeliveryInfo) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ExportDeliveryInfo.FromJson(__jsonDeliveryInfo) : DeliveryInfo; }
            { _runHistory = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("runHistory"), out var __jsonRunHistory) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ExportExecutionListResult.FromJson(__jsonRunHistory) : RunHistory; }
            { _format = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("format"), out var __jsonFormat) ? (string)__jsonFormat : (string)Format; }
            { _nextRunTimeEstimate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("nextRunTimeEstimate"), out var __jsonNextRunTimeEstimate) ? global::System.DateTime.TryParse((string)__jsonNextRunTimeEstimate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonNextRunTimeEstimateValue) ? __jsonNextRunTimeEstimateValue : NextRunTimeEstimate : NextRunTimeEstimate; }
            AfterFromJson(json);
        }
Пример #13
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="QueryDataset" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal QueryDataset(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _configuration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("configuration"), out var __jsonConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.QueryDatasetConfiguration.FromJson(__jsonConfiguration) : Configuration; }
            { _granularity = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("granularity"), out var __jsonGranularity) ? (string)__jsonGranularity : (string)Granularity; }
            { _aggregation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("aggregation"), out var __jsonAggregation) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.QueryDatasetAggregation.FromJson(__jsonAggregation) : Aggregation; }
            { _grouping = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray>("grouping"), out var __jsonGrouping) ? If(__jsonGrouping as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IQueryGrouping[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IQueryGrouping)(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.QueryGrouping.FromJson(__u)))))() : null : Grouping; }
            { _filter = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("filter"), out var __jsonFilter) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.QueryFilter.FromJson(__jsonFilter) : Filter; }
            AfterFromJson(json);
        }
Пример #14
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="ReportConfigFilter" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ReportConfigFilter(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _and = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray>("and"), out var __jsonAnd) ? If(__jsonAnd as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IReportConfigFilter[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IReportConfigFilter)(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ReportConfigFilter.FromJson(__u)))))() : null : And; }
            { _or = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray>("or"), out var __jsonOr) ? If(__jsonOr as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IReportConfigFilter[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IReportConfigFilter)(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ReportConfigFilter.FromJson(__p)))))() : null : Or; }
            { _not = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("not"), out var __jsonNot) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ReportConfigFilter.FromJson(__jsonNot) : Not; }
            { _dimension = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("dimension"), out var __jsonDimension) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ReportConfigComparisonExpression.FromJson(__jsonDimension) : Dimension; }
            { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("tag"), out var __jsonTag) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ReportConfigComparisonExpression.FromJson(__jsonTag) : Tag; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="ForecastDefinition" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ForecastDefinition(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _dataset = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("dataset"), out var __jsonDataset) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ForecastDataset.FromJson(__jsonDataset) : Dataset; }
            { _timePeriod = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("timePeriod"), out var __jsonTimePeriod) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.QueryTimePeriod.FromJson(__jsonTimePeriod) : TimePeriod; }
            { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; }
            { _includeActualCost = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonBoolean>("includeActualCost"), out var __jsonIncludeActualCost) ? (bool?)__jsonIncludeActualCost : IncludeActualCost; }
            { _includeFreshPartialCost = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonBoolean>("includeFreshPartialCost"), out var __jsonIncludeFreshPartialCost) ? (bool?)__jsonIncludeFreshPartialCost : IncludeFreshPartialCost; }
            { _timeframe = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("timeframe"), out var __jsonTimeframe) ? (string)__jsonTimeframe : (string)Timeframe; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="CostManagementIdentity" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal CostManagementIdentity(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _scope = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("scope"), out var __jsonScope) ? (string)__jsonScope : (string)Scope; }
            { _viewName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("viewName"), out var __jsonViewName) ? (string)__jsonViewName : (string)ViewName; }
            { _alertId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("alertId"), out var __jsonAlertId) ? (string)__jsonAlertId : (string)AlertId; }
            { _externalCloudProviderType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("externalCloudProviderType"), out var __jsonExternalCloudProviderType) ? (string)__jsonExternalCloudProviderType : (string)ExternalCloudProviderType; }
            { _externalCloudProviderId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("externalCloudProviderId"), out var __jsonExternalCloudProviderId) ? (string)__jsonExternalCloudProviderId : (string)ExternalCloudProviderId; }
            { _exportName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("exportName"), out var __jsonExportName) ? (string)__jsonExportName : (string)ExportName; }
            { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; }
            AfterFromJson(json);
        }
Пример #17
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="DimensionProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal DimensionProperties(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; }
            { _category = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("category"), out var __jsonCategory) ? (string)__jsonCategory : (string)Category; }
            { _data = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray>("data"), out var __jsonData) ? If(__jsonData as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : Data; }
            { _filterEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonBoolean>("filterEnabled"), out var __jsonFilterEnabled) ? (bool?)__jsonFilterEnabled : FilterEnabled; }
            { _groupingEnabled = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonBoolean>("groupingEnabled"), out var __jsonGroupingEnabled) ? (bool?)__jsonGroupingEnabled : GroupingEnabled; }
            { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; }
            { _total = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNumber>("total"), out var __jsonTotal) ? (int?)__jsonTotal : Total; }
            { _usageEnd = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("usageEnd"), out var __jsonUsageEnd) ? global::System.DateTime.TryParse((string)__jsonUsageEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUsageEndValue) ? __jsonUsageEndValue : UsageEnd : UsageEnd; }
            { _usageStart = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("usageStart"), out var __jsonUsageStart) ? global::System.DateTime.TryParse((string)__jsonUsageStart, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUsageStartValue) ? __jsonUsageStartValue : UsageStart : UsageStart; }
            AfterFromJson(json);
        }
Пример #18
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="ExportExecutionProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ExportExecutionProperties(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _error = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ErrorDetails.FromJson(__jsonError) : Error; }
            { _runSetting = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("runSettings"), out var __jsonRunSettings) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.CommonExportProperties.FromJson(__jsonRunSettings) : RunSetting; }
            { _executionType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("executionType"), out var __jsonExecutionType) ? (string)__jsonExecutionType : (string)ExecutionType; }
            { _fileName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("fileName"), out var __jsonFileName) ? (string)__jsonFileName : (string)FileName; }
            { _processingEndTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("processingEndTime"), out var __jsonProcessingEndTime) ? global::System.DateTime.TryParse((string)__jsonProcessingEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonProcessingEndTimeValue) ? __jsonProcessingEndTimeValue : ProcessingEndTime : ProcessingEndTime; }
            { _processingStartTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("processingStartTime"), out var __jsonProcessingStartTime) ? global::System.DateTime.TryParse((string)__jsonProcessingStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonProcessingStartTimeValue) ? __jsonProcessingStartTimeValue : ProcessingStartTime : ProcessingStartTime; }
            { _status = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status; }
            { _submittedBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("submittedBy"), out var __jsonSubmittedBy) ? (string)__jsonSubmittedBy : (string)SubmittedBy; }
            { _submittedTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("submittedTime"), out var __jsonSubmittedTime) ? global::System.DateTime.TryParse((string)__jsonSubmittedTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonSubmittedTimeValue) ? __jsonSubmittedTimeValue : SubmittedTime : SubmittedTime; }
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="ViewProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal ViewProperties(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _query = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("query"), out var __jsonQuery) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.ReportConfigDefinition.FromJson(__jsonQuery) : Query; }
            { _accumulated = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("accumulated"), out var __jsonAccumulated) ? (string)__jsonAccumulated : (string)Accumulated; }
            { _chart = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("chart"), out var __jsonChart) ? (string)__jsonChart : (string)Chart; }
            { _createdOn = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("createdOn"), out var __jsonCreatedOn) ? global::System.DateTime.TryParse((string)__jsonCreatedOn, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedOnValue) ? __jsonCreatedOnValue : CreatedOn : CreatedOn; }
            { _displayName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName; }
            { _kpi = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray>("kpis"), out var __jsonKpis) ? If(__jsonKpis as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IKpiProperties[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IKpiProperties)(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.KpiProperties.FromJson(__u)))))() : null : Kpi; }
            { _metric = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("metric"), out var __jsonMetric) ? (string)__jsonMetric : (string)Metric; }
            { _modifiedOn = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("modifiedOn"), out var __jsonModifiedOn) ? global::System.DateTime.TryParse((string)__jsonModifiedOn, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonModifiedOnValue) ? __jsonModifiedOnValue : ModifiedOn : ModifiedOn; }
            { _pivot = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray>("pivots"), out var __jsonPivots) ? If(__jsonPivots as Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IPivotProperties[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.IPivotProperties)(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.PivotProperties.FromJson(__p)))))() : null : Pivot; }
            { _scope = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("scope"), out var __jsonScope) ? (string)__jsonScope : (string)Scope; }
            AfterFromJson(json);
        }
Пример #20
0
        /// <summary>
        /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of <see cref="AlertProperties" />.
        /// </summary>
        /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from.</param>
        internal AlertProperties(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            { _definition = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("definition"), out var __jsonDefinition) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.AlertPropertiesDefinition.FromJson(__jsonDefinition) : Definition; }
            { _detail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject>("details"), out var __jsonDetails) ? Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20200601.AlertPropertiesDetails.FromJson(__jsonDetails) : Detail; }
            { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; }
            { _closeTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("closeTime"), out var __jsonCloseTime) ? (string)__jsonCloseTime : (string)CloseTime; }
            { _costEntityId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("costEntityId"), out var __jsonCostEntityId) ? (string)__jsonCostEntityId : (string)CostEntityId; }
            { _creationTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("creationTime"), out var __jsonCreationTime) ? (string)__jsonCreationTime : (string)CreationTime; }
            { _modificationTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("modificationTime"), out var __jsonModificationTime) ? (string)__jsonModificationTime : (string)ModificationTime; }
            { _source = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("source"), out var __jsonSource) ? (string)__jsonSource : (string)Source; }
            { _status = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status; }
            { _statusModificationTime = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("statusModificationTime"), out var __jsonStatusModificationTime) ? (string)__jsonStatusModificationTime : (string)StatusModificationTime; }
            { _statusModificationUserName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString>("statusModificationUserName"), out var __jsonStatusModificationUserName) ? (string)__jsonStatusModificationUserName : (string)StatusModificationUserName; }
            AfterFromJson(json);
        }
Пример #21
0
        /// <summary>
        /// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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.CostManagement.Runtime.Json.JsonObject container);
Пример #22
0
        /// <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.CostManagement.Runtime.Json.JsonObject json);
        /// <summary>
        /// Serializes this instance of <see cref="ExportDeliveryInfo" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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.CostManagement.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ExportDeliveryInfo" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject();

            bool returnNow = false;

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

            bool returnNow = false;

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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add);
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Пример #26
0
        /// <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.CostManagement.Runtime.Json.JsonObject json, ref bool returnNow);
Пример #27
0
        /// <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.CostManagement.Runtime.Json.JsonObject container, ref bool returnNow);
Пример #28
0
        /// <summary>
        /// Serializes this instance of <see cref="ReportConfigFilter" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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.CostManagement.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ReportConfigFilter" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (null != this._and)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.XNodeArray();
                foreach (var __x in this._and)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("and", __w);
            }
            if (null != this._or)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.XNodeArray();
                foreach (var __s in this._or)
                {
                    AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                }
                container.Add("or", __r);
            }
            AddIf(null != this._not ? (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode) this._not.ToJson(null, serializationMode) : null, "not", container.Add);
            AddIf(null != this._dimension ? (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode) this._dimension.ToJson(null, serializationMode) : null, "dimension", container.Add);
            AddIf(null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode) this._tag.ToJson(null, serializationMode) : null, "tag", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Пример #29
0
        /// <summary>
        /// Serializes this instance of <see cref="QueryComparisonExpression" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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.CostManagement.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="QueryComparisonExpression" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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.CostManagement.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AddIf(null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator", container.Add);
            if (null != this._value)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.XNodeArray();
                foreach (var __x in this._value)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("values", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
Пример #30
0
        /// <summary>
        /// Serializes this instance of <see cref="Any" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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.CostManagement.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Any" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AfterToJson(ref container);
            return(container);
        }