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

[MetricsAdvisor] Added setters to data feed sources #21611

Merged
merged 7 commits into from
Jun 4, 2021
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -447,41 +447,47 @@ internal AnomalyIncident() { }
public partial class AzureApplicationInsightsDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public AzureApplicationInsightsDataFeedSource(string applicationId, string apiKey, string azureCloud, string query) { }
public string ApplicationId { get { throw null; } }
public string AzureCloud { get { throw null; } }
public string Query { get { throw null; } }
public string ApplicationId { get { throw null; } set { } }
public string AzureCloud { get { throw null; } set { } }
public string Query { get { throw null; } set { } }
public void UpdateApiKey(string apiKey) { }
}
public partial class AzureBlobDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public AzureBlobDataFeedSource(string connectionString, string container, string blobTemplate) { }
public string BlobTemplate { get { throw null; } }
public string Container { get { throw null; } }
public string BlobTemplate { get { throw null; } set { } }
public string Container { get { throw null; } set { } }
public void UpdateConnectionString(string connectionString) { }
}
public partial class AzureCosmosDbDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public AzureCosmosDbDataFeedSource(string connectionString, string sqlQuery, string database, string collectionId) { }
public string CollectionId { get { throw null; } }
public string Database { get { throw null; } }
public string SqlQuery { get { throw null; } }
public string CollectionId { get { throw null; } set { } }
public string Database { get { throw null; } set { } }
public string SqlQuery { get { throw null; } set { } }
public void UpdateConnectionString(string connectionString) { }
}
public partial class AzureDataExplorerDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public AzureDataExplorerDataFeedSource(string connectionString, string query) { }
public string Query { get { throw null; } }
public string Query { get { throw null; } set { } }
public void UpdateConnectionString(string connectionString) { }
}
public partial class AzureDataLakeStorageGen2DataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public AzureDataLakeStorageGen2DataFeedSource(string accountName, string accountKey, string fileSystemName, string directoryTemplate, string fileTemplate) { }
public string AccountName { get { throw null; } }
public string DirectoryTemplate { get { throw null; } }
public string FileSystemName { get { throw null; } }
public string FileTemplate { get { throw null; } }
public string AccountName { get { throw null; } set { } }
public string DirectoryTemplate { get { throw null; } set { } }
public string FileSystemName { get { throw null; } set { } }
public string FileTemplate { get { throw null; } set { } }
public void UpdateAccountKey(string accountKey) { }
}
public partial class AzureTableDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public AzureTableDataFeedSource(string connectionString, string table, string query) { }
public string Query { get { throw null; } }
public string Table { get { throw null; } }
public string Query { get { throw null; } set { } }
public string Table { get { throw null; } set { } }
public void UpdateConnectionString(string connectionString) { }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct BoundaryDirection : System.IEquatable<Azure.AI.MetricsAdvisor.Models.BoundaryDirection>
Expand Down Expand Up @@ -884,9 +890,11 @@ internal IncidentRootCause() { }
public partial class InfluxDbDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public InfluxDbDataFeedSource(string connectionString, string database, string username, string password, string query) { }
public string Database { get { throw null; } }
public string Query { get { throw null; } }
public string Username { get { throw null; } }
public string Database { get { throw null; } set { } }
public string Query { get { throw null; } set { } }
public string Username { get { throw null; } set { } }
public void UpdateConnectionString(string connectionString) { }
public void UpdatePassword(string password) { }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct IngestionStatusType : System.IEquatable<Azure.AI.MetricsAdvisor.Models.IngestionStatusType>
Expand Down Expand Up @@ -1076,13 +1084,15 @@ public MetricWholeSeriesDetectionCondition() { }
public partial class MongoDbDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public MongoDbDataFeedSource(string connectionString, string database, string command) { }
public string Command { get { throw null; } }
public string Database { get { throw null; } }
public string Command { get { throw null; } set { } }
public string Database { get { throw null; } set { } }
public void UpdateConnectionString(string connectionString) { }
}
public partial class MySqlDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public MySqlDataFeedSource(string connectionString, string query) { }
public string Query { get { throw null; } }
public string Query { get { throw null; } set { } }
public void UpdateConnectionString(string connectionString) { }
}
public partial class NotificationHook
{
Expand Down Expand Up @@ -1114,7 +1124,8 @@ internal NotificationHook() { }
public partial class PostgreSqlDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public PostgreSqlDataFeedSource(string connectionString, string query) { }
public string Query { get { throw null; } }
public string Query { get { throw null; } set { } }
public void UpdateConnectionString(string connectionString) { }
}
public partial class ServicePrincipalDatasourceCredential : Azure.AI.MetricsAdvisor.Models.DatasourceCredential
{
Expand Down Expand Up @@ -1172,7 +1183,8 @@ public void UpdateConnectionString(string connectionString) { }
public partial class SqlServerDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource
{
public SqlServerDataFeedSource(string connectionString, string query) { }
public string Query { get { throw null; } }
public string Query { get { throw null; } set { } }
public void UpdateConnectionString(string connectionString) { }
}
public partial class SuppressCondition
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ internal AzureApplicationInsightsDataFeedSource(AzureApplicationInsightsParamete
/// <summary>
/// The Application ID.
/// </summary>
public string ApplicationId { get; }
public string ApplicationId { get; set; }

/// <summary>
/// The Azure cloud environment.
/// </summary>
public string AzureCloud { get; }
public string AzureCloud { get; set; }

/// <summary>
/// The query used to filter the data to be ingested.
/// </summary>
public string Query { get; }
public string Query { get; set; }

/// <summary>
/// The API key.
Expand All @@ -71,5 +71,17 @@ internal string ApiKey
get => Volatile.Read(ref _apiKey);
private set => Volatile.Write(ref _apiKey, value);
}

/// <summary>
/// Updates the API key.
/// </summary>
/// <param name="apiKey">The new API key to be used for authentication.</param>
/// <exception cref="ArgumentNullException"><paramref name="apiKey"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="apiKey"/> is empty.</exception>
public void UpdateApiKey(string apiKey)
{
Argument.AssertNotNullOrEmpty(apiKey, nameof(apiKey));
ApiKey = apiKey;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ internal AzureBlobDataFeedSource(AzureBlobParameter parameter)
/// <summary>
/// The name of the blob container.
/// </summary>
public string Container { get; }
public string Container { get; set; }

/// <summary>
/// This is the template of the Blob file names. For example: /%Y/%m/X_%Y-%m-%d-%h-%M.json. The following parameters are supported:
Expand All @@ -98,7 +98,7 @@ internal AzureBlobDataFeedSource(AzureBlobParameter parameter)
/// </item>
/// </list>
/// </summary>
public string BlobTemplate { get; }
public string BlobTemplate { get; set; }

/// <summary>
/// The connection string for authenticating to the Azure Storage Account.
Expand All @@ -108,5 +108,17 @@ internal string ConnectionString
get => Volatile.Read(ref _connectionString);
private set => Volatile.Write(ref _connectionString, value);
}

/// <summary>
/// Updates the connection string.
/// </summary>
/// <param name="connectionString">The new connection string to be used for authentication.</param>
/// <exception cref="ArgumentNullException"><paramref name="connectionString"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="connectionString"/> is empty.</exception>
public void UpdateConnectionString(string connectionString)
{
Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString));
ConnectionString = connectionString;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ internal AzureCosmosDbDataFeedSource(AzureCosmosDBParameter parameter)
/// <summary>
/// The SQL query to retrieve the data to be ingested.
/// </summary>
public string SqlQuery { get; }
public string SqlQuery { get; set; }

/// <summary>
/// The name of the database.
/// </summary>
public string Database { get; }
public string Database { get; set; }

/// <summary>
/// The collection ID.
/// </summary>
public string CollectionId { get; }
public string CollectionId { get; set; }

/// <summary>
/// The connection string.
Expand All @@ -71,5 +71,17 @@ internal string ConnectionString
get => Volatile.Read(ref _connectionString);
private set => Volatile.Write(ref _connectionString, value);
}

/// <summary>
/// Updates the connection string.
/// </summary>
/// <param name="connectionString">The new connection string to be used for authentication.</param>
/// <exception cref="ArgumentNullException"><paramref name="connectionString"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="connectionString"/> is empty.</exception>
public void UpdateConnectionString(string connectionString)
{
Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString));
ConnectionString = connectionString;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ internal AzureDataExplorerDataFeedSource(SqlSourceParameter parameter)
/// <summary>
/// The query to retrieve the data to be ingested.
/// </summary>
public string Query { get; }
public string Query { get; set; }

/// <summary>
/// The connection string.
Expand All @@ -53,5 +53,17 @@ internal string ConnectionString
get => Volatile.Read(ref _connectionString);
private set => Volatile.Write(ref _connectionString, value);
}

/// <summary>
/// Updates the connection string.
/// </summary>
/// <param name="connectionString">The new connection string to be used for authentication.</param>
/// <exception cref="ArgumentNullException"><paramref name="connectionString"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="connectionString"/> is empty.</exception>
public void UpdateConnectionString(string connectionString)
{
Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString));
ConnectionString = connectionString;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ internal AzureDataLakeStorageGen2DataFeedSource(AzureDataLakeStorageGen2Paramete
/// <summary>
/// The name of the Storage Account.
/// </summary>
public string AccountName { get; }
public string AccountName { get; set; }

/// <summary>
/// The name of the file system.
/// </summary>
public string FileSystemName { get; }
public string FileSystemName { get; set; }

/// <summary>
/// The directory template.
/// </summary>
public string DirectoryTemplate { get; }
public string DirectoryTemplate { get; set; }

/// <summary>
/// This is the file template of the Blob file. For example: X_%Y-%m-%d-%h-%M.json. The following parameters are supported:
Expand All @@ -116,7 +116,7 @@ internal AzureDataLakeStorageGen2DataFeedSource(AzureDataLakeStorageGen2Paramete
/// </item>
/// </list>
/// </summary>
public string FileTemplate { get; }
public string FileTemplate { get; set; }

/// <summary>
/// The Storage Account key.
Expand All @@ -126,5 +126,17 @@ internal string AccountKey
get => Volatile.Read(ref _accountKey);
private set => Volatile.Write(ref _accountKey, value);
}

/// <summary>
/// Updates the account key.
/// </summary>
/// <param name="accountKey">The new account key to be used for authentication.</param>
/// <exception cref="ArgumentNullException"><paramref name="accountKey"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="accountKey"/> is empty.</exception>
public void UpdateAccountKey(string accountKey)
{
Argument.AssertNotNullOrEmpty(accountKey, nameof(accountKey));
AccountKey = accountKey;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ internal AzureTableDataFeedSource(AzureTableParameter parameter)
/// <summary>
/// The name of the Table.
/// </summary>
public string Table { get; }
public string Table { get; set; }

/// <summary>
/// The query to retrieve the data to be ingested.
/// </summary>
public string Query { get; }
public string Query { get; set; }

/// <summary>
/// The connection string for authenticating to the Azure Storage Account.
Expand All @@ -62,5 +62,17 @@ internal string ConnectionString
get => Volatile.Read(ref _connectionString);
private set => Volatile.Write(ref _connectionString, value);
}

/// <summary>
/// Updates the connection string.
/// </summary>
/// <param name="connectionString">The new connection string to be used for authentication.</param>
/// <exception cref="ArgumentNullException"><paramref name="connectionString"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="connectionString"/> is empty.</exception>
public void UpdateConnectionString(string connectionString)
{
Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString));
ConnectionString = connectionString;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ internal InfluxDbDataFeedSource(InfluxDBParameter parameter)
/// <summary>
/// The name of the database.
/// </summary>
public string Database { get; }
public string Database { get; set; }

/// <summary>
/// The access username.
/// </summary>
public string Username { get; }
public string Username { get; set; }

/// <summary>
/// The query to retrieve the data to be ingested.
/// </summary>
public string Query { get; }
public string Query { get; set; }

/// <summary>
/// The connection string.
Expand All @@ -86,5 +86,29 @@ internal string Password
get => Volatile.Read(ref _password);
private set => Volatile.Write(ref _password, value);
}

/// <summary>
/// Updates the connection string.
/// </summary>
/// <param name="connectionString">The new connection string to be used for authentication.</param>
/// <exception cref="ArgumentNullException"><paramref name="connectionString"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="connectionString"/> is empty.</exception>
public void UpdateConnectionString(string connectionString)
{
Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString));
ConnectionString = connectionString;
}

/// <summary>
/// Updates the password.
/// </summary>
/// <param name="password">The new password to be used for authentication.</param>
/// <exception cref="ArgumentNullException"><paramref name="password"/> is null.</exception>
/// <exception cref="ArgumentException"><paramref name="password"/> is empty.</exception>
public void UpdatePassword(string password)
{
Argument.AssertNotNullOrEmpty(password, nameof(password));
Password = password;
}
}
}
Loading