Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing Measure/Column properties #169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
28 changes: 28 additions & 0 deletions sdk/swaggers/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down Expand Up @@ -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"
}
}
},
Expand Down