From e9c6d2068a1f0c5894579287ad84b1df4e1a6a80 Mon Sep 17 00:00:00 2001 From: Marco Russo Date: Sun, 27 Dec 2020 16:45:17 +0100 Subject: [PATCH] Added missing Measure/Column properties Added missing properties. - Measure: isHidden, formatString - Column: isHidden, summarizeBy, dataCategory, sortByColumn --- sdk/PowerBI.Api/Source/Models/Column.cs | 43 ++++++++++++++++++- .../Source/Models/GatewayDatasource.cs | 4 +- sdk/PowerBI.Api/Source/Models/Measure.cs | 30 ++++++++++++- sdk/swaggers/swagger.json | 28 ++++++++++++ 4 files changed, 101 insertions(+), 4 deletions(-) diff --git a/sdk/PowerBI.Api/Source/Models/Column.cs b/sdk/PowerBI.Api/Source/Models/Column.cs index f2d01312..ee035342 100644 --- a/sdk/PowerBI.Api/Source/Models/Column.cs +++ b/sdk/PowerBI.Api/Source/Models/Column.cs @@ -31,11 +31,24 @@ public Column() /// (Optional) The format of the column as /// specified in /// [FORMAT_STRING](https://docs.microsoft.com/analysis-services/multidimensional-models/mdx/mdx-cell-properties-format-string-contents) - public Column(string name, string dataType, string formatString = default(string)) + /// (Optional) String name of a column in + /// the same table to be used to order the current column + /// (Optional) String value to be used for + /// the data category which describes the data within this + /// column + /// (Optional) Property indicating if the column + /// is hidden from view. Default is false. + /// (Optional) Aggregate Function to use for + /// summarizing this column + public Column(string name, string dataType, string formatString = default(string), string sortByColumn = default(string), string dataCategory = default(string), bool? isHidden = default(bool?), string summarizeBy = default(string)) { Name = name; DataType = dataType; FormatString = formatString; + SortByColumn = sortByColumn; + DataCategory = dataCategory; + IsHidden = isHidden; + SummarizeBy = summarizeBy; CustomInit(); } @@ -63,6 +76,34 @@ public Column() [JsonProperty(PropertyName = "formatString")] public string FormatString { get; set; } + /// + /// Gets or sets (Optional) String name of a column in the same table + /// to be used to order the current column + /// + [JsonProperty(PropertyName = "sortByColumn")] + public string SortByColumn { get; set; } + + /// + /// Gets or sets (Optional) String value to be used for the data + /// category which describes the data within this column + /// + [JsonProperty(PropertyName = "dataCategory")] + public string DataCategory { get; set; } + + /// + /// Gets or sets (Optional) Property indicating if the column is hidden + /// from view. Default is false. + /// + [JsonProperty(PropertyName = "isHidden")] + public bool? IsHidden { get; set; } + + /// + /// Gets or sets (Optional) Aggregate Function to use for summarizing + /// this column + /// + [JsonProperty(PropertyName = "summarizeBy")] + public string SummarizeBy { get; set; } + /// /// Validate the object. /// diff --git a/sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs b/sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs index 8707116d..d9e23af4 100644 --- a/sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs +++ b/sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs @@ -27,7 +27,7 @@ public GatewayDatasource() /// /// The unique id for this datasource /// The associated gateway id - /// Type of the datasoruce credentials. + /// Type of the datasource credentials. /// Possible values include: 'Basic', 'Windows', 'Anonymous', 'OAuth2', /// 'Key' /// The name of the datasource @@ -81,7 +81,7 @@ public GatewayDatasource() public string ConnectionDetails { get; set; } /// - /// Gets or sets type of the datasoruce credentials. Possible values + /// Gets or sets type of the datasource credentials. Possible values /// include: 'Basic', 'Windows', 'Anonymous', 'OAuth2', 'Key' /// [JsonProperty(PropertyName = "credentialType")] diff --git a/sdk/PowerBI.Api/Source/Models/Measure.cs b/sdk/PowerBI.Api/Source/Models/Measure.cs index 80f06aae..568a731f 100644 --- a/sdk/PowerBI.Api/Source/Models/Measure.cs +++ b/sdk/PowerBI.Api/Source/Models/Measure.cs @@ -28,10 +28,18 @@ public Measure() /// /// The measure name /// A valid DAX expression - public Measure(string name, string expression) + /// (Optional) A string describing how the + /// value should be formatted when it is displayed as specified in + /// [FORMAT_STRING](https://docs.microsoft.com/analysis-services/multidimensional-models/mdx/mdx-cell-properties-format-string-contents) + /// (Optional) Measure description + /// (Optional) Is measure hidden + public Measure(string name, string expression, string formatString = default(string), string description = default(string), bool? isHidden = default(bool?)) { Name = name; Expression = expression; + FormatString = formatString; + Description = description; + IsHidden = isHidden; CustomInit(); } @@ -52,6 +60,26 @@ public Measure(string name, string expression) [JsonProperty(PropertyName = "expression")] public string Expression { get; set; } + /// + /// Gets or sets (Optional) A string describing how the value should be + /// formatted when it is displayed as specified in + /// [FORMAT_STRING](https://docs.microsoft.com/analysis-services/multidimensional-models/mdx/mdx-cell-properties-format-string-contents) + /// + [JsonProperty(PropertyName = "formatString")] + public string FormatString { get; set; } + + /// + /// Gets or sets (Optional) Measure description + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets (Optional) Is measure hidden + /// + [JsonProperty(PropertyName = "isHidden")] + public bool? IsHidden { get; set; } + /// /// Validate the object. /// diff --git a/sdk/swaggers/swagger.json b/sdk/swaggers/swagger.json index 8fecf666..1327c89e 100644 --- a/sdk/swaggers/swagger.json +++ b/sdk/swaggers/swagger.json @@ -14860,6 +14860,22 @@ "formatString": { "type": "string", "description": "(Optional) The format of the column as specified in [FORMAT_STRING](https://docs.microsoft.com/analysis-services/multidimensional-models/mdx/mdx-cell-properties-format-string-contents)" + }, + "sortByColumn": { + "type": "string", + "description": "(Optional) String name of a column in the same table to be used to order the current column" + }, + "dataCategory": { + "type": "string", + "description": "(Optional) String value to be used for the data category which describes the data within this column" + }, + "isHidden": { + "type": "boolean", + "description": "(Optional) Property indicating if the column is hidden from view. Default is false." + }, + "summarizeBy": { + "type": "string", + "description": "(Optional) Aggregate Function to use for summarizing this column" } } }, @@ -14887,6 +14903,18 @@ "expression": { "type": "string", "description": "A valid DAX expression" + }, + "formatString": { + "type": "string", + "description": "(Optional) A string describing how the value should be formatted when it is displayed as specified in [FORMAT_STRING](https://docs.microsoft.com/analysis-services/multidimensional-models/mdx/mdx-cell-properties-format-string-contents)" + }, + "description": { + "type": "string", + "description": "(Optional) Measure description" + }, + "isHidden": { + "type": "boolean", + "description": "(Optional) Is measure hidden" } } },