Skip to content

Commit

Permalink
Merged PR 146141: Added missing Measure/Column properties
Browse files Browse the repository at this point in the history
Mirroring: [Added missing Measure/Column properties](#169)
  • Loading branch information
Eklavya Mirani committed Feb 11, 2021
1 parent 18eac26 commit ec59d0e
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 5 deletions.
43 changes: 42 additions & 1 deletion sdk/PowerBI.Api/Source/Models/Column.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,24 @@ public Column()
/// <param name="formatString">(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)</param>
public Column(string name, string dataType, string formatString = default(string))
/// <param name="sortByColumn">(Optional) String name of a column in
/// the same table to be used to order the current column</param>
/// <param name="dataCategory">(Optional) String value to be used for
/// the data category which describes the data within this
/// column</param>
/// <param name="isHidden">(Optional) Property indicating if the column
/// is hidden from view. Default is false.</param>
/// <param name="summarizeBy">(Optional) Aggregate Function to use for
/// summarizing this column</param>
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();
}

Expand Down Expand Up @@ -63,6 +76,34 @@ public Column()
[JsonProperty(PropertyName = "formatString")]
public string FormatString { get; set; }

/// <summary>
/// Gets or sets (Optional) String name of a column in the same table
/// to be used to order the current column
/// </summary>
[JsonProperty(PropertyName = "sortByColumn")]
public string SortByColumn { get; set; }

/// <summary>
/// Gets or sets (Optional) String value to be used for the data
/// category which describes the data within this column
/// </summary>
[JsonProperty(PropertyName = "dataCategory")]
public string DataCategory { get; set; }

/// <summary>
/// Gets or sets (Optional) Property indicating if the column is hidden
/// from view. Default is false.
/// </summary>
[JsonProperty(PropertyName = "isHidden")]
public bool? IsHidden { get; set; }

/// <summary>
/// Gets or sets (Optional) Aggregate Function to use for summarizing
/// this column
/// </summary>
[JsonProperty(PropertyName = "summarizeBy")]
public string SummarizeBy { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public GatewayDatasource()
/// </summary>
/// <param name="id">The unique id for this datasource</param>
/// <param name="gatewayId">The associated gateway id</param>
/// <param name="credentialType">Type of the datasoruce credentials.
/// <param name="credentialType">Type of the datasource credentials.
/// Possible values include: 'Basic', 'Windows', 'Anonymous', 'OAuth2',
/// 'Key'</param>
/// <param name="datasourceName">The name of the datasource</param>
Expand Down Expand Up @@ -81,7 +81,7 @@ public GatewayDatasource()
public string ConnectionDetails { get; set; }

/// <summary>
/// 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'
/// </summary>
[JsonProperty(PropertyName = "credentialType")]
Expand Down
30 changes: 29 additions & 1 deletion sdk/PowerBI.Api/Source/Models/Measure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,18 @@ public Measure()
/// </summary>
/// <param name="name">The measure name</param>
/// <param name="expression">A valid DAX expression</param>
public Measure(string name, string expression)
/// <param name="formatString">(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)</param>
/// <param name="description">(Optional) Measure description</param>
/// <param name="isHidden">(Optional) Is measure hidden</param>
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();
}

Expand All @@ -52,6 +60,26 @@ public Measure(string name, string expression)
[JsonProperty(PropertyName = "expression")]
public string Expression { get; set; }

/// <summary>
/// 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)
/// </summary>
[JsonProperty(PropertyName = "formatString")]
public string FormatString { get; set; }

/// <summary>
/// Gets or sets (Optional) Measure description
/// </summary>
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }

/// <summary>
/// Gets or sets (Optional) Is measure hidden
/// </summary>
[JsonProperty(PropertyName = "isHidden")]
public bool? IsHidden { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
30 changes: 29 additions & 1 deletion sdk/swaggers/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -14862,6 +14862,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"
}
}
},
Expand Down Expand Up @@ -14889,6 +14905,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"
}
}
},
Expand Down Expand Up @@ -14956,7 +14984,7 @@
},
"credentialType": {
"type": "string",
"description": "Type of the datasoruce credentials",
"description": "Type of the datasource credentials",
"enum": [
"Basic",
"Windows",
Expand Down

0 comments on commit ec59d0e

Please sign in to comment.