/// <summary> /// Gets a dataset. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='datasetName'> /// The dataset name. /// </param> /// <param name='ifNoneMatch'> /// ETag of the dataset entity. Should only be specified for get. If the ETag /// matches the existing entity tag, or if * was provided, then no content will /// be returned. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DatasetResource> GetAsync(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, datasetName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists datasets. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <DatasetResource> > ListByFactoryAsync(this IDatasetsOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates a dataset. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='datasetName'> /// The dataset name. /// </param> /// <param name='dataset'> /// Dataset resource definition. /// </param> /// <param name='ifMatch'> /// ETag of the dataset entity. Should only be specified for update, for which /// it should match existing entity or can be * for unconditional update. /// </param> public static DatasetResource CreateOrUpdate(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName, DatasetResource dataset, string ifMatch = default(string)) { return(operations.CreateOrUpdateAsync(resourceGroupName, factoryName, datasetName, dataset, ifMatch).GetAwaiter().GetResult()); }
/// <summary> /// Lists datasets. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> public static IPage <DatasetResource> ListByFactory(this IDatasetsOperations operations, string resourceGroupName, string factoryName) { return(operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult()); }
/// <summary> /// Lists datasets. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <DatasetResource> ListByFactoryNext(this IDatasetsOperations operations, string nextPageLink) { return(operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a dataset. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='datasetName'> /// The dataset name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, datasetName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a dataset. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='datasetName'> /// The dataset name. /// </param> public static void Delete(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName) { operations.DeleteAsync(resourceGroupName, factoryName, datasetName).GetAwaiter().GetResult(); }
/// <summary> /// Gets a dataset. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='factoryName'> /// The factory name. /// </param> /// <param name='datasetName'> /// The dataset name. /// </param> /// <param name='ifNoneMatch'> /// ETag of the dataset entity. Should only be specified for get. If the ETag /// matches the existing entity tag, or if * was provided, then no content will /// be returned. /// </param> public static DatasetResource Get(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName, string ifNoneMatch = default(string)) { return(operations.GetAsync(resourceGroupName, factoryName, datasetName, ifNoneMatch).GetAwaiter().GetResult()); }