Skip to content

Commit

Permalink
[MetricsAdvisor] Moved SourceType from DataFeed to DataFeedSource (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
kinelski authored Jun 23, 2021
1 parent 293df1b commit 5d28868
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 170 deletions.
1 change: 1 addition & 0 deletions sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Moved `DatasourceCredential`, `DataFeedSource`, `NotificationHook`, and all of their concrete child types to the `Azure.AI.MetricsAdvisor.Administration` namespace.
- Moved `MetricFeedback` and all of its concrete child types to the `Azure.AI.MetricsAdvisor` namespace.
- Changed order of parameters of `MetricsAdvisorClient.GetMetricEnrichedSeriesData`. Now, `detectionConfigurationId` appears first.
- Moved property `DataFeed.SourceType` to `DataFeedSource.DataSourceType`.
- In `MetricsAdvisorKeyCredential`, merged `UpdateSubscriptionKey` and `UpdateApiKey` into a single method, `Update`, to make it an atomic operation.

## 1.0.0-beta.4 (2021-06-07)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ public void UpdateConnectionString(string connectionString) { }
public abstract partial class DataFeedSource
{
internal DataFeedSource() { }
public Azure.AI.MetricsAdvisor.Models.DataFeedSourceType DataSourceType { get { throw null; } }
}
public partial class DataLakeGen2SharedKeyDataSourceCredential : Azure.AI.MetricsAdvisor.Administration.DataSourceCredential
{
Expand Down Expand Up @@ -739,7 +740,6 @@ public DataFeed() { }
public string Name { get { throw null; } set { } }
public Azure.AI.MetricsAdvisor.Models.DataFeedRollupSettings RollupSettings { get { throw null; } set { } }
public Azure.AI.MetricsAdvisor.Models.DataFeedSchema Schema { get { throw null; } set { } }
public Azure.AI.MetricsAdvisor.Models.DataFeedSourceType? SourceType { get { throw null; } }
public Azure.AI.MetricsAdvisor.Models.DataFeedStatus? Status { get { throw null; } }
public System.Collections.Generic.IList<string> ViewersEmails { get { throw null; } }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public GetDataFeedsFilter()
public DataFeedStatus? Status { get; set; }

/// <summary>
/// Filters the result by <see cref="DataFeed.SourceType"/>.
/// Filters the result by the type of the <see cref="DataFeedSource"/>.
/// </summary>
public DataFeedSourceType? SourceType { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ internal DataFeed(DataFeedDetail dataFeedDetail)
/// </summary>
public DataFeedSource DataSource { get; set; }

/// <summary>
/// The type of data source that ingests this <see cref="DataFeed"/> with data.
/// </summary>
public DataFeedSourceType? SourceType => DataSource?.Type;

/// <summary>
/// Defines how this <see cref="DataFeed"/> structures the data ingested from the data source
/// in terms of metrics and dimensions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ namespace Azure.AI.MetricsAdvisor.Administration
/// </summary>
public abstract class DataFeedSource
{
internal DataFeedSourceType Type { get; }

internal DataFeedSource(DataFeedSourceType dataFeedSourceType)
{
Type = dataFeedSourceType;
DataSourceType = dataFeedSourceType;
}

/// <summary>
/// The type of this data source.
/// </summary>
public DataFeedSourceType DataSourceType { get; }

internal static DataFeedSource GetDataFeedSource(DataFeedDetail dataFeedDetail) =>
dataFeedDetail switch
{
Expand Down
Loading

0 comments on commit 5d28868

Please sign in to comment.