Skip to content

Commit ec59d0e

Browse files
author
Eklavya Mirani
committed
Merged PR 146141: Added missing Measure/Column properties
Mirroring: [Added missing Measure/Column properties](#169)
1 parent 18eac26 commit ec59d0e

File tree

4 files changed

+102
-5
lines changed

4 files changed

+102
-5
lines changed

sdk/PowerBI.Api/Source/Models/Column.cs

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,24 @@ public Column()
3131
/// <param name="formatString">(Optional) The format of the column as
3232
/// specified in
3333
/// [FORMAT_STRING](https://docs.microsoft.com/analysis-services/multidimensional-models/mdx/mdx-cell-properties-format-string-contents)</param>
34-
public Column(string name, string dataType, string formatString = default(string))
34+
/// <param name="sortByColumn">(Optional) String name of a column in
35+
/// the same table to be used to order the current column</param>
36+
/// <param name="dataCategory">(Optional) String value to be used for
37+
/// the data category which describes the data within this
38+
/// column</param>
39+
/// <param name="isHidden">(Optional) Property indicating if the column
40+
/// is hidden from view. Default is false.</param>
41+
/// <param name="summarizeBy">(Optional) Aggregate Function to use for
42+
/// summarizing this column</param>
43+
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))
3544
{
3645
Name = name;
3746
DataType = dataType;
3847
FormatString = formatString;
48+
SortByColumn = sortByColumn;
49+
DataCategory = dataCategory;
50+
IsHidden = isHidden;
51+
SummarizeBy = summarizeBy;
3952
CustomInit();
4053
}
4154

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

79+
/// <summary>
80+
/// Gets or sets (Optional) String name of a column in the same table
81+
/// to be used to order the current column
82+
/// </summary>
83+
[JsonProperty(PropertyName = "sortByColumn")]
84+
public string SortByColumn { get; set; }
85+
86+
/// <summary>
87+
/// Gets or sets (Optional) String value to be used for the data
88+
/// category which describes the data within this column
89+
/// </summary>
90+
[JsonProperty(PropertyName = "dataCategory")]
91+
public string DataCategory { get; set; }
92+
93+
/// <summary>
94+
/// Gets or sets (Optional) Property indicating if the column is hidden
95+
/// from view. Default is false.
96+
/// </summary>
97+
[JsonProperty(PropertyName = "isHidden")]
98+
public bool? IsHidden { get; set; }
99+
100+
/// <summary>
101+
/// Gets or sets (Optional) Aggregate Function to use for summarizing
102+
/// this column
103+
/// </summary>
104+
[JsonProperty(PropertyName = "summarizeBy")]
105+
public string SummarizeBy { get; set; }
106+
66107
/// <summary>
67108
/// Validate the object.
68109
/// </summary>

sdk/PowerBI.Api/Source/Models/GatewayDatasource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public GatewayDatasource()
2727
/// </summary>
2828
/// <param name="id">The unique id for this datasource</param>
2929
/// <param name="gatewayId">The associated gateway id</param>
30-
/// <param name="credentialType">Type of the datasoruce credentials.
30+
/// <param name="credentialType">Type of the datasource credentials.
3131
/// Possible values include: 'Basic', 'Windows', 'Anonymous', 'OAuth2',
3232
/// 'Key'</param>
3333
/// <param name="datasourceName">The name of the datasource</param>
@@ -81,7 +81,7 @@ public GatewayDatasource()
8181
public string ConnectionDetails { get; set; }
8282

8383
/// <summary>
84-
/// Gets or sets type of the datasoruce credentials. Possible values
84+
/// Gets or sets type of the datasource credentials. Possible values
8585
/// include: 'Basic', 'Windows', 'Anonymous', 'OAuth2', 'Key'
8686
/// </summary>
8787
[JsonProperty(PropertyName = "credentialType")]

sdk/PowerBI.Api/Source/Models/Measure.cs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,18 @@ public Measure()
2828
/// </summary>
2929
/// <param name="name">The measure name</param>
3030
/// <param name="expression">A valid DAX expression</param>
31-
public Measure(string name, string expression)
31+
/// <param name="formatString">(Optional) A string describing how the
32+
/// value should be formatted when it is displayed as specified in
33+
/// [FORMAT_STRING](https://docs.microsoft.com/analysis-services/multidimensional-models/mdx/mdx-cell-properties-format-string-contents)</param>
34+
/// <param name="description">(Optional) Measure description</param>
35+
/// <param name="isHidden">(Optional) Is measure hidden</param>
36+
public Measure(string name, string expression, string formatString = default(string), string description = default(string), bool? isHidden = default(bool?))
3237
{
3338
Name = name;
3439
Expression = expression;
40+
FormatString = formatString;
41+
Description = description;
42+
IsHidden = isHidden;
3543
CustomInit();
3644
}
3745

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

63+
/// <summary>
64+
/// Gets or sets (Optional) A string describing how the value should be
65+
/// formatted when it is displayed as specified in
66+
/// [FORMAT_STRING](https://docs.microsoft.com/analysis-services/multidimensional-models/mdx/mdx-cell-properties-format-string-contents)
67+
/// </summary>
68+
[JsonProperty(PropertyName = "formatString")]
69+
public string FormatString { get; set; }
70+
71+
/// <summary>
72+
/// Gets or sets (Optional) Measure description
73+
/// </summary>
74+
[JsonProperty(PropertyName = "description")]
75+
public string Description { get; set; }
76+
77+
/// <summary>
78+
/// Gets or sets (Optional) Is measure hidden
79+
/// </summary>
80+
[JsonProperty(PropertyName = "isHidden")]
81+
public bool? IsHidden { get; set; }
82+
5583
/// <summary>
5684
/// Validate the object.
5785
/// </summary>

sdk/swaggers/swagger.json

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14862,6 +14862,22 @@
1486214862
"formatString": {
1486314863
"type": "string",
1486414864
"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)"
14865+
},
14866+
"sortByColumn": {
14867+
"type": "string",
14868+
"description": "(Optional) String name of a column in the same table to be used to order the current column"
14869+
},
14870+
"dataCategory": {
14871+
"type": "string",
14872+
"description": "(Optional) String value to be used for the data category which describes the data within this column"
14873+
},
14874+
"isHidden": {
14875+
"type": "boolean",
14876+
"description": "(Optional) Property indicating if the column is hidden from view. Default is false."
14877+
},
14878+
"summarizeBy": {
14879+
"type": "string",
14880+
"description": "(Optional) Aggregate Function to use for summarizing this column"
1486514881
}
1486614882
}
1486714883
},
@@ -14889,6 +14905,18 @@
1488914905
"expression": {
1489014906
"type": "string",
1489114907
"description": "A valid DAX expression"
14908+
},
14909+
"formatString": {
14910+
"type": "string",
14911+
"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)"
14912+
},
14913+
"description": {
14914+
"type": "string",
14915+
"description": "(Optional) Measure description"
14916+
},
14917+
"isHidden": {
14918+
"type": "boolean",
14919+
"description": "(Optional) Is measure hidden"
1489214920
}
1489314921
}
1489414922
},
@@ -14956,7 +14984,7 @@
1495614984
},
1495714985
"credentialType": {
1495814986
"type": "string",
14959-
"description": "Type of the datasoruce credentials",
14987+
"description": "Type of the datasource credentials",
1496014988
"enum": [
1496114989
"Basic",
1496214990
"Windows",

0 commit comments

Comments
 (0)