Skip to content
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 @@ -4,11 +4,11 @@ Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --tag=track1-package-2019-05-preview --csharp-sdks-folder=D:\src\azure-sdk-for-net\sdk
2019-11-12 18:57:33 UTC
2019-11-19 21:16:48 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 825f8feb2fc22784a0f3a20241519f7a87c0da3c
Commit: 2222f0ff6009aaf9aa632af5a678f2f874dff6fd
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4407
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ public static DataSource CosmosDb(
Throw.IfArgumentNullOrEmpty(collectionName, nameof(collectionName));
Throw.IfArgumentNullOrEmpty(cosmosDbConnectionString, nameof(cosmosDbConnectionString));

return new DataSource()
return new DataSource
{
Type = DataSourceType.CosmosDb,
Name = name,
Description = description,
Container = new DataContainer()
Container = new DataContainer
{
Name = collectionName,
Query = query
Expand Down Expand Up @@ -198,12 +198,12 @@ public static DataSource AzureBlobStorage(
Throw.IfArgumentNullOrEmpty(containerName, nameof(containerName));
Throw.IfArgumentNullOrEmpty(storageConnectionString, nameof(storageConnectionString));

return new DataSource()
return new DataSource
{
Type = DataSourceType.AzureBlob,
Name = name,
Description = description,
Container = new DataContainer()
Container = new DataContainer
{
Name = containerName,
Query = pathPrefix
Expand Down Expand Up @@ -236,12 +236,12 @@ public static DataSource AzureTableStorage(
Throw.IfArgumentNullOrEmpty(tableName, nameof(tableName));
Throw.IfArgumentNullOrEmpty(storageConnectionString, nameof(storageConnectionString));

return new DataSource()
return new DataSource
{
Type = DataSourceType.AzureTable,
Name = name,
Description = description,
Container = new DataContainer()
Container = new DataContainer
{
Name = tableName,
Query = query
Expand All @@ -251,6 +251,48 @@ public static DataSource AzureTableStorage(
};
}

Comment thread
arv100kri marked this conversation as resolved.
/// <summary>
/// Creates a new DataSource to connect to a MySQL database hosted in Azure
/// </summary>
/// <param name="name">The name of the data source</param>
/// <param name="connectionString">The connection string to the MySQL data base, which should follow the format:
/// "Server=server.mysql.database.azure.com; Port=port; Database=database; Uid=user@account; Pwd=password; SslMode=Preferred;"
/// </param>
/// <param name="tableName">The name of the table from which to read rows.</param>
/// <param name="query">Optional. A query that is applied to the table when reading rows.</param>
/// <param name="changeDetectionPolicy">Optional. The data change detection policy for the datasource.</param>
/// <param name="deletionDetectionPolicy">Optional. The data deletion detection policy for the datasource.</param>
/// <param name="description">Optional. Description of the datasource.</param>
/// <returns>A new DataSource instance</returns>
public static DataSource MySql(
string name,
string connectionString,
string tableName,
string query = null,
HighWaterMarkChangeDetectionPolicy changeDetectionPolicy = null,
DataDeletionDetectionPolicy deletionDetectionPolicy = null,
string description = null)
{
Throw.IfArgumentNullOrEmpty(name, nameof(name));
Throw.IfArgumentNullOrEmpty(tableName, nameof(tableName));
Throw.IfArgumentNullOrEmpty(connectionString, nameof(connectionString));

return new DataSource
{
Type = DataSourceType.MySql,
Name = name,
Description = description,
Container = new DataContainer
{
Name = tableName,
Query = query
},
Credentials = new DataSourceCredentials(connectionString),
DataChangeDetectionPolicy = changeDetectionPolicy,
DataDeletionDetectionPolicy = deletionDetectionPolicy
};
}

private static DataSource CreateSqlDataSource(
string name,
string sqlConnectionString,
Expand All @@ -263,12 +305,12 @@ private static DataSource CreateSqlDataSource(
Throw.IfArgumentNullOrEmpty(tableOrViewName, nameof(tableOrViewName));
Throw.IfArgumentNullOrEmpty(sqlConnectionString, nameof(sqlConnectionString));

return new DataSource()
return new DataSource
{
Type = DataSourceType.AzureSql,
Name = name,
Description = description,
Container = new DataContainer()
Container = new DataContainer
{
Name = tableOrViewName
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,40 @@ namespace Microsoft.Azure.Search
public partial interface ISkillsetsOperations
{
/// <summary>
/// Creates a new skillset or updates a skillset if
/// it already exists.
/// Creates a new skillset or updates a skillset if it already
/// exists.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/Update-Skillset" />
/// </summary>
/// <param name='skillset'>
/// The definition of the skillset to create or update.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// Additional parameters for the operation.
/// </param>
/// <param name='accessCondition'>
/// Additional parameters for the operation
/// Additional parameters for the operation.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// Headers that will be added to the request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="CloudException">
/// Thrown when the operation returns an invalid status code.
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response.
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when the skillset definition violates validation rules.
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null.
/// </exception>
/// <returns>
/// A response object containing the response body and response headers.
/// </returns>
Task<AzureOperationResponse<Skillset>> CreateOrUpdateWithHttpMessagesAsync(Skillset skillset, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
Expand All @@ -43,11 +59,23 @@ public partial interface ISkillsetsOperations
/// Additional parameters for the operation
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// Headers that will be added to the request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="CloudException">
/// Thrown when the operation returns an invalid status code.
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response.
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when the skillset definition violates validation rules.
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null.
/// </exception>
/// <returns>
/// A response with the value <c>true</c> if the skillset exists; <c>false</c> otherwise.
/// </returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,76 @@ namespace Microsoft.Azure.Search

internal partial class SkillsetsOperations
{
/// <inheritdoc />
/// <summary>
/// Creates a new skillset or updates a skillset if it already
/// exists.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/Update-Skillset" />
/// </summary>
/// <param name='skillset'>
/// The definition of the skillset to create or update.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation.
/// </param>
/// <param name='accessCondition'>
/// Additional parameters for the operation.
Comment thread
arv100kri marked this conversation as resolved.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="CloudException">
/// Thrown when the operation returned an invalid status code.
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response.
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when the skillset definition violates validation rules.
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null.
/// </exception>
/// <returns>
/// A response object containing the response body and response headers.
/// </returns>
public Task<AzureOperationResponse<Skillset>> CreateOrUpdateWithHttpMessagesAsync(Skillset skillset, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
return CreateOrUpdateWithHttpMessagesAsync(skillset?.Name, skillset, searchRequestOptions, customHeaders, cancellationToken);
return CreateOrUpdateWithHttpMessagesAsync(skillset?.Name, skillset, searchRequestOptions, accessCondition, customHeaders, cancellationToken);
}

/// <inheritdoc />
/// <summary>
/// Determines whether or not the given skillset exists in the search service.
/// </summary>
/// <param name="skillsetName">
/// The name of the data source.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="CloudException">
/// Thrown when the operation returned an invalid status code.
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response.
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when the skillset definition violates validation rules.
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null.
/// </exception>
/// <returns>
/// A response with the value <c>true</c> if the skillset exists; <c>false</c> otherwise.
/// </returns>
public Task<AzureOperationResponse<bool>> ExistsWithHttpMessagesAsync(
string skillsetName,
SearchRequestOptions searchRequestOptions = default(SearchRequestOptions),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public static partial class SkillsetsOperationsExtensions
/// <param name='accessCondition'>
/// Additional parameters for the operation
/// </param>
/// <returns>
/// The skillset that was created or updated.
/// </returns>
public static Skillset CreateOrUpdate(this ISkillsetsOperations operations, Skillset skillset, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition))
{
return operations.CreateOrUpdateAsync(skillset, searchRequestOptions, accessCondition).GetAwaiter().GetResult();
Expand All @@ -54,6 +57,9 @@ public static partial class SkillsetsOperationsExtensions
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <returns>
/// The skillset that was created or updated.
/// </returns>
public static async Task<Skillset> CreateOrUpdateAsync(this ISkillsetsOperations operations, Skillset skillset, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(skillset, searchRequestOptions, accessCondition, null, cancellationToken).ConfigureAwait(false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public partial interface ISkillsetsOperations
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// </param>
/// <param name='accessCondition'>
/// Additional parameters for the operation
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
Expand All @@ -53,7 +56,7 @@ public partial interface ISkillsetsOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<Skillset>> CreateOrUpdateWithHttpMessagesAsync(string skillsetName, Skillset skillset, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<Skillset>> CreateOrUpdateWithHttpMessagesAsync(string skillsetName, Skillset skillset, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Deletes a skillset in a search service.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/delete-skillset" />
Expand All @@ -64,6 +67,9 @@ public partial interface ISkillsetsOperations
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// </param>
/// <param name='accessCondition'>
/// Additional parameters for the operation
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
Expand All @@ -76,7 +82,7 @@ public partial interface ISkillsetsOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse> DeleteWithHttpMessagesAsync(string skillsetName, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse> DeleteWithHttpMessagesAsync(string skillsetName, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Retrieves a skillset in a search service.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/get-skillset" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public DataSource()
/// </summary>
/// <param name="name">The name of the datasource.</param>
/// <param name="type">The type of the datasource. Possible values
/// include: 'AzureSql', 'CosmosDb', 'AzureBlob', 'AzureTable'</param>
/// include: 'AzureSql', 'CosmosDb', 'AzureBlob', 'AzureTable',
/// 'MySql'</param>
/// <param name="credentials">Credentials for the datasource.</param>
/// <param name="container">The data container for the
/// datasource.</param>
Expand Down Expand Up @@ -76,7 +77,7 @@ public DataSource()

/// <summary>
/// Gets or sets the type of the datasource. Possible values include:
/// 'AzureSql', 'CosmosDb', 'AzureBlob', 'AzureTable'
/// 'AzureSql', 'CosmosDb', 'AzureBlob', 'AzureTable', 'MySql'
/// </summary>
[JsonProperty(PropertyName = "type")]
public DataSourceType Type { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ private DataSourceType(string underlyingValue)

public static readonly DataSourceType AzureTable = "azuretable";

public static readonly DataSourceType MySql = "mysql";


/// <summary>
/// Underlying value of enum DataSourceType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_SearchServiceCl
public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --tag=track1-package-2019-05-preview --csharp-sdks-folder=D:\\src\\azure-sdk-for-net\\sdk";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
public static readonly String GithubCommidId = "825f8feb2fc22784a0f3a20241519f7a87c0da3c";
public static readonly String GithubCommidId = "2222f0ff6009aaf9aa632af5a678f2f874dff6fd";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
Expand Down
Loading