diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/AccountsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/AccountsOperations.cs index 7044ddaea35c..fb8cbfa847f2 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/AccountsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/AccountsOperations.cs @@ -51,16 +51,13 @@ internal AccountsOperations(DataShareManagementClient client) public DataShareManagementClient Client { get; private set; } /// - /// Get an account under a resource group + /// List Accounts in a subscription /// /// - /// Get an account + /// List Accounts in Subscription /// - /// - /// The resource group name. - /// - /// - /// The name of the share account. + /// + /// Continuation token /// /// /// Headers that will be added to request. @@ -83,20 +80,12 @@ internal AccountsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBySubscriptionWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (accountName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); - } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -108,22 +97,23 @@ internal AccountsOperations(DataShareManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("accountName", accountName); + tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -212,7 +202,7 @@ internal AccountsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -225,7 +215,7 @@ internal AccountsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -245,63 +235,10 @@ internal AccountsOperations(DataShareManagementClient client) } /// - /// Create an account in the given resource group - /// - /// - /// Create an account - /// - /// - /// The resource group name. - /// - /// - /// The name of the share account. - /// - /// - /// The account payload. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, Account account, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, accountName, account, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete an account - /// - /// - /// DeleteAccount - /// - /// - /// The resource group name. - /// - /// - /// The name of the share account. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Patch a given account + /// Get an account under a resource group /// /// - /// Patch an account + /// Get an account /// /// /// The resource group name. @@ -309,9 +246,6 @@ internal AccountsOperations(DataShareManagementClient client) /// /// The name of the share account. /// - /// - /// The account update parameters. - /// /// /// Headers that will be added to request. /// @@ -333,7 +267,7 @@ internal AccountsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -347,10 +281,6 @@ internal AccountsOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - if (accountUpdateParameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "accountUpdateParameters"); - } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -364,9 +294,8 @@ internal AccountsOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("accountUpdateParameters", accountUpdateParameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -386,7 +315,7 @@ internal AccountsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -417,12 +346,6 @@ internal AccountsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; - if(accountUpdateParameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(accountUpdateParameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -506,13 +429,72 @@ internal AccountsOperations(DataShareManagementClient client) } /// - /// List Accounts in a subscription + /// Create an account in the given resource group /// /// - /// List Accounts in Subscription + /// Create an account /// - /// - /// Continuation token + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The account payload. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, Account account, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, accountName, account, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete an account + /// + /// + /// DeleteAccount + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Patch a given account + /// + /// + /// Patch an account + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The account update parameters. /// /// /// Headers that will be added to request. @@ -535,12 +517,24 @@ internal AccountsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountUpdateParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountUpdateParameters"); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -552,23 +546,23 @@ internal AccountsOperations(DataShareManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("accountUpdateParameters", accountUpdateParameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -576,7 +570,7 @@ internal AccountsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -607,6 +601,12 @@ internal AccountsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; + if(accountUpdateParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(accountUpdateParameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -657,7 +657,7 @@ internal AccountsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -670,7 +670,7 @@ internal AccountsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/AccountsOperationsExtensions.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/AccountsOperationsExtensions.cs index 7971abde20e3..4701f9430738 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/AccountsOperationsExtensions.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/AccountsOperationsExtensions.cs @@ -21,6 +21,46 @@ namespace Microsoft.Azure.Management.DataShare /// public static partial class AccountsOperationsExtensions { + /// + /// List Accounts in a subscription + /// + /// + /// List Accounts in Subscription + /// + /// + /// The operations group for this extension method. + /// + /// + /// Continuation token + /// + public static IPage ListBySubscription(this IAccountsOperations operations, string skipToken = default(string)) + { + return operations.ListBySubscriptionAsync(skipToken).GetAwaiter().GetResult(); + } + + /// + /// List Accounts in a subscription + /// + /// + /// List Accounts in Subscription + /// + /// + /// The operations group for this extension method. + /// + /// + /// Continuation token + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionAsync(this IAccountsOperations operations, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(skipToken, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get an account under a resource group /// @@ -217,46 +257,6 @@ public static Account Update(this IAccountsOperations operations, string resourc } } - /// - /// List Accounts in a subscription - /// - /// - /// List Accounts in Subscription - /// - /// - /// The operations group for this extension method. - /// - /// - /// Continuation token - /// - public static IPage ListBySubscription(this IAccountsOperations operations, string skipToken = default(string)) - { - return operations.ListBySubscriptionAsync(skipToken).GetAwaiter().GetResult(); - } - - /// - /// List Accounts in a subscription - /// - /// - /// List Accounts in Subscription - /// - /// - /// The operations group for this extension method. - /// - /// - /// Continuation token - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionAsync(this IAccountsOperations operations, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// List Accounts in a resource group /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerInvitationsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerInvitationsOperations.cs index b8fcc63a5fd7..fc57f14eea54 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerInvitationsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerInvitationsOperations.cs @@ -51,16 +51,13 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) public DataShareManagementClient Client { get; private set; } /// - /// Rejects the invitation identified by invitationId + /// List the invitations /// /// - /// Reject an invitation + /// Lists invitations /// - /// - /// Location of the invitation - /// - /// - /// An invitation payload + /// + /// The continuation token /// /// /// Headers that will be added to request. @@ -83,20 +80,8 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> RejectInvitationWithHttpMessagesAsync(string location, ConsumerInvitation invitation, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListInvitationsWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - if (invitation == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "invitation"); - } - if (invitation != null) - { - invitation.Validate(); - } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -108,20 +93,22 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("location", location); - tracingParameters.Add("invitation", invitation); + tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RejectInvitation", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListInvitations", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DataShare/locations/{location}/RejectInvitation").ToString(); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DataShare/listInvitations").ToString(); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -129,7 +116,7 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -160,12 +147,6 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; - if(invitation != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(invitation, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -216,7 +197,7 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -229,7 +210,7 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -438,13 +419,16 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) } /// - /// List the invitations + /// Rejects the invitation identified by invitationId /// /// - /// Lists invitations + /// Reject an invitation /// - /// - /// The continuation token + /// + /// Location of the invitation + /// + /// + /// An invitation payload /// /// /// Headers that will be added to request. @@ -467,8 +451,20 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListInvitationsWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> RejectInvitationWithHttpMessagesAsync(string location, ConsumerInvitation invitation, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (invitation == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "invitation"); + } + if (invitation != null) + { + invitation.Validate(); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -480,22 +476,20 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("location", location); + tracingParameters.Add("invitation", invitation); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInvitations", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "RejectInvitation", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DataShare/ListInvitations").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DataShare/locations/{location}/rejectInvitation").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -503,7 +497,7 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -534,6 +528,12 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; + if(invitation != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(invitation, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -584,7 +584,7 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -597,7 +597,7 @@ internal ConsumerInvitationsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerInvitationsOperationsExtensions.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerInvitationsOperationsExtensions.cs index 55efdc3c3107..fcb7b3d99d40 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerInvitationsOperationsExtensions.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerInvitationsOperationsExtensions.cs @@ -22,46 +22,40 @@ namespace Microsoft.Azure.Management.DataShare public static partial class ConsumerInvitationsOperationsExtensions { /// - /// Rejects the invitation identified by invitationId + /// List the invitations /// /// - /// Reject an invitation + /// Lists invitations /// /// /// The operations group for this extension method. /// - /// - /// Location of the invitation - /// - /// - /// An invitation payload + /// + /// The continuation token /// - public static ConsumerInvitation RejectInvitation(this IConsumerInvitationsOperations operations, string location, ConsumerInvitation invitation) + public static IPage ListInvitations(this IConsumerInvitationsOperations operations, string skipToken = default(string)) { - return operations.RejectInvitationAsync(location, invitation).GetAwaiter().GetResult(); + return operations.ListInvitationsAsync(skipToken).GetAwaiter().GetResult(); } /// - /// Rejects the invitation identified by invitationId + /// List the invitations /// /// - /// Reject an invitation + /// Lists invitations /// /// /// The operations group for this extension method. /// - /// - /// Location of the invitation - /// - /// - /// An invitation payload + /// + /// The continuation token /// /// /// The cancellation token. /// - public static async Task RejectInvitationAsync(this IConsumerInvitationsOperations operations, string location, ConsumerInvitation invitation, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListInvitationsAsync(this IConsumerInvitationsOperations operations, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.RejectInvitationWithHttpMessagesAsync(location, invitation, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListInvitationsWithHttpMessagesAsync(skipToken, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -114,40 +108,46 @@ public static ConsumerInvitation Get(this IConsumerInvitationsOperations operati } /// - /// List the invitations + /// Rejects the invitation identified by invitationId /// /// - /// Lists invitations + /// Reject an invitation /// /// /// The operations group for this extension method. /// - /// - /// The continuation token + /// + /// Location of the invitation /// - public static IPage ListInvitations(this IConsumerInvitationsOperations operations, string skipToken = default(string)) + /// + /// An invitation payload + /// + public static ConsumerInvitation RejectInvitation(this IConsumerInvitationsOperations operations, string location, ConsumerInvitation invitation) { - return operations.ListInvitationsAsync(skipToken).GetAwaiter().GetResult(); + return operations.RejectInvitationAsync(location, invitation).GetAwaiter().GetResult(); } /// - /// List the invitations + /// Rejects the invitation identified by invitationId /// /// - /// Lists invitations + /// Reject an invitation /// /// /// The operations group for this extension method. /// - /// - /// The continuation token + /// + /// Location of the invitation + /// + /// + /// An invitation payload /// /// /// The cancellation token. /// - public static async Task> ListInvitationsAsync(this IConsumerInvitationsOperations operations, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task RejectInvitationAsync(this IConsumerInvitationsOperations operations, string location, ConsumerInvitation invitation, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListInvitationsWithHttpMessagesAsync(skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.RejectInvitationWithHttpMessagesAsync(location, invitation, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerSourceDataSetsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerSourceDataSetsOperations.cs index 67523f50bbcc..fbb276859bf6 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerSourceDataSetsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ConsumerSourceDataSetsOperations.cs @@ -127,7 +127,7 @@ internal ConsumerSourceDataSetsOperations(DataShareManagementClient client) } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/ConsumerSourceDataSets").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/consumerSourceDataSets").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetMappingsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetMappingsOperations.cs index 497326a964ec..f33f699777e7 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetMappingsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetMappingsOperations.cs @@ -717,6 +717,12 @@ internal DataSetMappingsOperations(DataShareManagementClient client) /// /// Continuation token /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// /// /// Headers that will be added to request. /// @@ -738,7 +744,7 @@ internal DataSetMappingsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByShareSubscriptionWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByShareSubscriptionWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -771,6 +777,8 @@ internal DataSetMappingsOperations(DataShareManagementClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareSubscriptionName", shareSubscriptionName); tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("filter", filter); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListByShareSubscription", tracingParameters); } @@ -790,6 +798,14 @@ internal DataSetMappingsOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetMappingsOperationsExtensions.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetMappingsOperationsExtensions.cs index 536a42bddc6c..168c682af07a 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetMappingsOperationsExtensions.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetMappingsOperationsExtensions.cs @@ -223,9 +223,15 @@ public static void Delete(this IDataSetMappingsOperations operations, string res /// /// Continuation token /// - public static IPage ListByShareSubscription(this IDataSetMappingsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string)) + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// + public static IPage ListByShareSubscription(this IDataSetMappingsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), string filter = default(string), string orderby = default(string)) { - return operations.ListByShareSubscriptionAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken).GetAwaiter().GetResult(); + return operations.ListByShareSubscriptionAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken, filter, orderby).GetAwaiter().GetResult(); } /// @@ -249,12 +255,18 @@ public static void Delete(this IDataSetMappingsOperations operations, string res /// /// Continuation token /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// /// /// The cancellation token. /// - public static async Task> ListByShareSubscriptionAsync(this IDataSetMappingsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByShareSubscriptionAsync(this IDataSetMappingsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByShareSubscriptionWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByShareSubscriptionWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetsOperations.cs index 9f89024743db..5c3c2c9f0958 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetsOperations.cs @@ -555,6 +555,12 @@ internal DataSetsOperations(DataShareManagementClient client) /// /// continuation token /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// /// /// Headers that will be added to request. /// @@ -576,7 +582,7 @@ internal DataSetsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -609,6 +615,8 @@ internal DataSetsOperations(DataShareManagementClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareName", shareName); tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("filter", filter); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListByShare", tracingParameters); } @@ -628,6 +636,14 @@ internal DataSetsOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetsOperationsExtensions.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetsOperationsExtensions.cs index f9fb1d1090ea..8d7abcf02507 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetsOperationsExtensions.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataSetsOperationsExtensions.cs @@ -219,9 +219,15 @@ public static void Delete(this IDataSetsOperations operations, string resourceGr /// /// continuation token /// - public static IPage ListByShare(this IDataSetsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string)) + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// + public static IPage ListByShare(this IDataSetsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string)) { - return operations.ListByShareAsync(resourceGroupName, accountName, shareName, skipToken).GetAwaiter().GetResult(); + return operations.ListByShareAsync(resourceGroupName, accountName, shareName, skipToken, filter, orderby).GetAwaiter().GetResult(); } /// @@ -245,12 +251,18 @@ public static void Delete(this IDataSetsOperations operations, string resourceGr /// /// continuation token /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// /// /// The cancellation token. /// - public static async Task> ListByShareAsync(this IDataSetsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByShareAsync(this IDataSetsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByShareWithHttpMessagesAsync(resourceGroupName, accountName, shareName, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByShareWithHttpMessagesAsync(resourceGroupName, accountName, shareName, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataShareManagementClient.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataShareManagementClient.cs index 6161c80f6ebf..520e915dbd98 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataShareManagementClient.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/DataShareManagementClient.cs @@ -388,7 +388,7 @@ private void Initialize() SynchronizationSettings = new SynchronizationSettingsOperations(this); Triggers = new TriggersOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2019-11-01"; + ApiVersion = "2020-09-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IAccountsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IAccountsOperations.cs index 93e63ba01ac9..d6dd20a2025c 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IAccountsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IAccountsOperations.cs @@ -23,6 +23,31 @@ namespace Microsoft.Azure.Management.DataShare /// public partial interface IAccountsOperations { + /// + /// List Accounts in a subscription + /// + /// + /// List Accounts in Subscription + /// + /// + /// Continuation token + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListBySubscriptionWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get an account under a resource group /// @@ -142,31 +167,6 @@ public partial interface IAccountsOperations /// Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List Accounts in a subscription - /// - /// - /// List Accounts in Subscription - /// - /// - /// Continuation token - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// List Accounts in a resource group /// /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IConsumerInvitationsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IConsumerInvitationsOperations.cs index 7f1ca3ed424d..6325b92f815e 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IConsumerInvitationsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IConsumerInvitationsOperations.cs @@ -24,16 +24,13 @@ namespace Microsoft.Azure.Management.DataShare public partial interface IConsumerInvitationsOperations { /// - /// Rejects the invitation identified by invitationId + /// List the invitations /// /// - /// Reject an invitation + /// Lists invitations /// - /// - /// Location of the invitation - /// - /// - /// An invitation payload + /// + /// The continuation token /// /// /// The headers that will be added to request. @@ -50,7 +47,7 @@ public partial interface IConsumerInvitationsOperations /// /// Thrown when a required parameter is null /// - Task> RejectInvitationWithHttpMessagesAsync(string location, ConsumerInvitation invitation, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListInvitationsWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the invitation identified by invitationId /// @@ -80,13 +77,16 @@ public partial interface IConsumerInvitationsOperations /// Task> GetWithHttpMessagesAsync(string location, string invitationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List the invitations + /// Rejects the invitation identified by invitationId /// /// - /// Lists invitations + /// Reject an invitation /// - /// - /// The continuation token + /// + /// Location of the invitation + /// + /// + /// An invitation payload /// /// /// The headers that will be added to request. @@ -103,7 +103,7 @@ public partial interface IConsumerInvitationsOperations /// /// Thrown when a required parameter is null /// - Task>> ListInvitationsWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> RejectInvitationWithHttpMessagesAsync(string location, ConsumerInvitation invitation, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List the invitations /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IDataSetMappingsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IDataSetMappingsOperations.cs index ef1bfed000fb..9c35900c030e 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IDataSetMappingsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IDataSetMappingsOperations.cs @@ -146,6 +146,12 @@ public partial interface IDataSetMappingsOperations /// /// Continuation token /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// /// /// The headers that will be added to request. /// @@ -161,7 +167,7 @@ public partial interface IDataSetMappingsOperations /// /// Thrown when a required parameter is null /// - Task>> ListByShareSubscriptionWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByShareSubscriptionWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List DataSetMappings in a share subscription. /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IDataSetsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IDataSetsOperations.cs index d3b86037087a..91890aaaeaf1 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IDataSetsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IDataSetsOperations.cs @@ -143,6 +143,12 @@ public partial interface IDataSetsOperations /// /// continuation token /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// /// /// The headers that will be added to request. /// @@ -158,7 +164,7 @@ public partial interface IDataSetsOperations /// /// Thrown when a required parameter is null /// - Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete DataSet in a share. /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IInvitationsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IInvitationsOperations.cs index 03d7eed02517..c3e74ed03c19 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IInvitationsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IInvitationsOperations.cs @@ -143,6 +143,12 @@ public partial interface IInvitationsOperations /// /// The continuation token /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// /// /// The headers that will be added to request. /// @@ -158,7 +164,7 @@ public partial interface IInvitationsOperations /// /// Thrown when a required parameter is null /// - Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List all Invitations in a share. /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IProviderShareSubscriptionsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IProviderShareSubscriptionsOperations.cs index eb453727e565..e3cf96f11d91 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IProviderShareSubscriptionsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IProviderShareSubscriptionsOperations.cs @@ -24,10 +24,11 @@ namespace Microsoft.Azure.Management.DataShare public partial interface IProviderShareSubscriptionsOperations { /// - /// Get share subscription in a provider share. + /// Adjust the expiration date of a share subscription in a provider + /// share. /// /// - /// Get share subscription in a provider share + /// Adjust a share subscription's expiration date in a provider share /// /// /// The resource group name. @@ -41,6 +42,9 @@ public partial interface IProviderShareSubscriptionsOperations /// /// To locate shareSubscription /// + /// + /// The provider share subscription + /// /// /// The headers that will be added to request. /// @@ -56,12 +60,12 @@ public partial interface IProviderShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task> GetByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> AdjustWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, ProviderShareSubscription providerShareSubscription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List of available share subscriptions to a provider share. + /// Reinstate share subscription in a provider share. /// /// - /// List share subscriptions in a provider share + /// Reinstate share subscription in a provider share /// /// /// The resource group name. @@ -72,8 +76,11 @@ public partial interface IProviderShareSubscriptionsOperations /// /// The name of the share. /// - /// - /// Continuation Token + /// + /// To locate shareSubscription + /// + /// + /// The provider share subscription /// /// /// The headers that will be added to request. @@ -90,7 +97,7 @@ public partial interface IProviderShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ReinstateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, ProviderShareSubscription providerShareSubscription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Revoke share subscription in a provider share. /// @@ -126,10 +133,10 @@ public partial interface IProviderShareSubscriptionsOperations /// Task> RevokeWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Reinstate share subscription in a provider share. + /// Get share subscription in a provider share. /// /// - /// Reinstate share subscription in a provider share + /// Get share subscription in a provider share /// /// /// The resource group name. @@ -158,7 +165,41 @@ public partial interface IProviderShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task> ReinstateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List of available share subscriptions to a provider share. + /// + /// + /// List share subscriptions in a provider share + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The name of the share. + /// + /// + /// Continuation Token + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Revoke share subscription in a provider share. /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IShareSubscriptionsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IShareSubscriptionsOperations.cs index ec220422b1bb..0786309f949f 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IShareSubscriptionsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/IShareSubscriptionsOperations.cs @@ -24,10 +24,10 @@ namespace Microsoft.Azure.Management.DataShare public partial interface IShareSubscriptionsOperations { /// - /// Get shareSubscription in an account. + /// Request cancellation of a data share snapshot /// /// - /// Get a shareSubscription in an account + /// Request to cancel a synchronization. /// /// /// The resource group name. @@ -38,6 +38,9 @@ public partial interface IShareSubscriptionsOperations /// /// The name of the shareSubscription. /// + /// + /// Share Subscription Synchronization payload. + /// /// /// The headers that will be added to request. /// @@ -53,12 +56,12 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CancelSynchronizationWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Create shareSubscription in an account. + /// Get source share synchronization settings for a shareSubscription. /// /// - /// Create a shareSubscription in an account + /// Get synchronization settings set on a share /// /// /// The resource group name. @@ -69,8 +72,8 @@ public partial interface IShareSubscriptionsOperations /// /// The name of the shareSubscription. /// - /// - /// create parameters for shareSubscription + /// + /// Continuation token /// /// /// The headers that will be added to request. @@ -87,12 +90,13 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscription shareSubscription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSourceShareSynchronizationSettingsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete shareSubscription in an account. + /// List data set level details for a share subscription + /// synchronization /// /// - /// Delete a shareSubscription in an account + /// List synchronization details /// /// /// The resource group name. @@ -101,7 +105,19 @@ public partial interface IShareSubscriptionsOperations /// The name of the share account. /// /// - /// The name of the shareSubscription. + /// The name of the share subscription. + /// + /// + /// Share Subscription Synchronization payload. + /// + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The headers that will be added to request. @@ -118,12 +134,12 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSynchronizationDetailsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List of available share subscriptions under an account. + /// List Synchronizations in a share subscription. /// /// - /// List share subscriptions in an account + /// List synchronizations of a share subscription /// /// /// The resource group name. @@ -131,8 +147,17 @@ public partial interface IShareSubscriptionsOperations /// /// The name of the share account. /// + /// + /// The name of the share subscription. + /// /// - /// Continuation Token + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The headers that will be added to request. @@ -149,12 +174,12 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSynchronizationsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get source share synchronization settings for a shareSubscription. + /// Initiate an asynchronous data share job /// /// - /// Get synchronization settings set on a share + /// Initiate a copy /// /// /// The resource group name. @@ -163,10 +188,10 @@ public partial interface IShareSubscriptionsOperations /// The name of the share account. /// /// - /// The name of the shareSubscription. + /// The name of share subscription /// - /// - /// Continuation token + /// + /// Synchronize payload /// /// /// The headers that will be added to request. @@ -183,12 +208,12 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task>> ListSourceShareSynchronizationSettingsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> SynchronizeMethodWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Synchronize synchronize, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List Synchronizations in a share subscription. + /// Get shareSubscription in an account. /// /// - /// List synchronizations of a share subscription + /// Get a shareSubscription in an account /// /// /// The resource group name. @@ -197,10 +222,7 @@ public partial interface IShareSubscriptionsOperations /// The name of the share account. /// /// - /// The name of the share subscription. - /// - /// - /// Continuation token + /// The name of the shareSubscription. /// /// /// The headers that will be added to request. @@ -217,13 +239,12 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task>> ListSynchronizationsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List data set level details for a share subscription - /// synchronization + /// Create shareSubscription in an account. /// /// - /// List synchronization details + /// Create a shareSubscription in an account /// /// /// The resource group name. @@ -232,13 +253,10 @@ public partial interface IShareSubscriptionsOperations /// The name of the share account. /// /// - /// The name of the share subscription. - /// - /// - /// Share Subscription Synchronization payload. + /// The name of the shareSubscription. /// - /// - /// Continuation token + /// + /// create parameters for shareSubscription /// /// /// The headers that will be added to request. @@ -255,12 +273,12 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task>> ListSynchronizationDetailsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscription shareSubscription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Initiate an asynchronous data share job + /// Delete shareSubscription in an account. /// /// - /// Initiate a copy + /// Delete a shareSubscription in an account /// /// /// The resource group name. @@ -269,10 +287,7 @@ public partial interface IShareSubscriptionsOperations /// The name of the share account. /// /// - /// The name of share subscription - /// - /// - /// Synchronize payload + /// The name of the shareSubscription. /// /// /// The headers that will be added to request. @@ -289,12 +304,12 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task> SynchronizeMethodWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Synchronize synchronize, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Request cancellation of a data share snapshot + /// List of available share subscriptions under an account. /// /// - /// Request to cancel a synchronization. + /// List share subscriptions in an account /// /// /// The resource group name. @@ -302,11 +317,14 @@ public partial interface IShareSubscriptionsOperations /// /// The name of the share account. /// - /// - /// The name of the shareSubscription. + /// + /// Continuation Token /// - /// - /// Share Subscription Synchronization payload. + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The headers that will be added to request. @@ -323,12 +341,12 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task> CancelSynchronizationWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete shareSubscription in an account. + /// Request cancellation of a data share snapshot /// /// - /// Delete a shareSubscription in an account + /// Request to cancel a synchronization. /// /// /// The resource group name. @@ -339,6 +357,9 @@ public partial interface IShareSubscriptionsOperations /// /// The name of the shareSubscription. /// + /// + /// Share Subscription Synchronization payload. + /// /// /// The headers that will be added to request. /// @@ -354,7 +375,7 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginCancelSynchronizationWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Initiate an asynchronous data share job /// @@ -390,10 +411,10 @@ public partial interface IShareSubscriptionsOperations /// Task> BeginSynchronizeMethodWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Synchronize synchronize, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Request cancellation of a data share snapshot + /// Delete shareSubscription in an account. /// /// - /// Request to cancel a synchronization. + /// Delete a shareSubscription in an account /// /// /// The resource group name. @@ -404,9 +425,6 @@ public partial interface IShareSubscriptionsOperations /// /// The name of the shareSubscription. /// - /// - /// Share Subscription Synchronization payload. - /// /// /// The headers that will be added to request. /// @@ -422,12 +440,12 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task> BeginCancelSynchronizationWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List of available share subscriptions under an account. + /// Get source share synchronization settings for a shareSubscription. /// /// - /// List share subscriptions in an account + /// Get synchronization settings set on a share /// /// /// The NextLink from the previous successful call to List operation. @@ -447,12 +465,13 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSourceShareSynchronizationSettingsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get source share synchronization settings for a shareSubscription. + /// List data set level details for a share subscription + /// synchronization /// /// - /// Get synchronization settings set on a share + /// List synchronization details /// /// /// The NextLink from the previous successful call to List operation. @@ -472,7 +491,7 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task>> ListSourceShareSynchronizationSettingsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSynchronizationDetailsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List Synchronizations in a share subscription. /// @@ -499,11 +518,10 @@ public partial interface IShareSubscriptionsOperations /// Task>> ListSynchronizationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List data set level details for a share subscription - /// synchronization + /// List of available share subscriptions under an account. /// /// - /// List synchronization details + /// List share subscriptions in an account /// /// /// The NextLink from the previous successful call to List operation. @@ -523,6 +541,6 @@ public partial interface IShareSubscriptionsOperations /// /// Thrown when a required parameter is null /// - Task>> ListSynchronizationDetailsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ISharesOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ISharesOperations.cs index cf0eb4d8ee74..fdc763400f50 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ISharesOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ISharesOperations.cs @@ -24,10 +24,10 @@ namespace Microsoft.Azure.Management.DataShare public partial interface ISharesOperations { /// - /// Get a specified share + /// List data set level details for a share synchronization /// /// - /// Get a share + /// List synchronization details /// /// /// The resource group name. @@ -36,7 +36,19 @@ public partial interface ISharesOperations /// The name of the share account. /// /// - /// The name of the share to retrieve. + /// The name of the share. + /// + /// + /// Share Synchronization payload. + /// + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The headers that will be added to request. @@ -53,12 +65,12 @@ public partial interface ISharesOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSynchronizationDetailsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Create a share in the given account. + /// List Synchronizations in a share /// /// - /// Create a share + /// List synchronizations of a share /// /// /// The resource group name. @@ -69,8 +81,14 @@ public partial interface ISharesOperations /// /// The name of the share. /// - /// - /// The share payload + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The headers that will be added to request. @@ -87,12 +105,12 @@ public partial interface ISharesOperations /// /// Thrown when a required parameter is null /// - Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Share share, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSynchronizationsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Deletes a share + /// Get a specified share /// /// - /// Delete a share + /// Get a share /// /// /// The resource group name. @@ -101,7 +119,7 @@ public partial interface ISharesOperations /// The name of the share account. /// /// - /// The name of the share. + /// The name of the share to retrieve. /// /// /// The headers that will be added to request. @@ -118,12 +136,12 @@ public partial interface ISharesOperations /// /// Thrown when a required parameter is null /// - Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List of available shares under an account. + /// Create a share in the given account. /// /// - /// List shares in an account + /// Create a share /// /// /// The resource group name. @@ -131,8 +149,11 @@ public partial interface ISharesOperations /// /// The name of the share account. /// - /// - /// Continuation Token + /// + /// The name of the share. + /// + /// + /// The share payload /// /// /// The headers that will be added to request. @@ -149,12 +170,12 @@ public partial interface ISharesOperations /// /// Thrown when a required parameter is null /// - Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Share share, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List Synchronizations in a share + /// Deletes a share /// /// - /// List synchronizations of a share + /// Delete a share /// /// /// The resource group name. @@ -165,9 +186,6 @@ public partial interface ISharesOperations /// /// The name of the share. /// - /// - /// Continuation token - /// /// /// The headers that will be added to request. /// @@ -183,12 +201,12 @@ public partial interface ISharesOperations /// /// Thrown when a required parameter is null /// - Task>> ListSynchronizationsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List data set level details for a share synchronization + /// List of available shares under an account. /// /// - /// List synchronization details + /// List shares in an account /// /// /// The resource group name. @@ -196,14 +214,14 @@ public partial interface ISharesOperations /// /// The name of the share account. /// - /// - /// The name of the share. + /// + /// Continuation Token /// - /// - /// Share Synchronization payload. + /// + /// Filters the results using OData syntax. /// - /// - /// Continuation token + /// + /// Sorts the results using OData syntax. /// /// /// The headers that will be added to request. @@ -220,7 +238,7 @@ public partial interface ISharesOperations /// /// Thrown when a required parameter is null /// - Task>> ListSynchronizationDetailsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a share /// @@ -253,10 +271,10 @@ public partial interface ISharesOperations /// Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List of available shares under an account. + /// List data set level details for a share synchronization /// /// - /// List shares in an account + /// List synchronization details /// /// /// The NextLink from the previous successful call to List operation. @@ -276,7 +294,7 @@ public partial interface ISharesOperations /// /// Thrown when a required parameter is null /// - Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListSynchronizationDetailsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// List Synchronizations in a share /// @@ -303,10 +321,10 @@ public partial interface ISharesOperations /// Task>> ListSynchronizationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List data set level details for a share synchronization + /// List of available shares under an account. /// /// - /// List synchronization details + /// List shares in an account /// /// /// The NextLink from the previous successful call to List operation. @@ -326,6 +344,6 @@ public partial interface ISharesOperations /// /// Thrown when a required parameter is null /// - Task>> ListSynchronizationDetailsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ISynchronizationSettingsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ISynchronizationSettingsOperations.cs index f174657ae639..0442a22a28c3 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ISynchronizationSettingsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ISynchronizationSettingsOperations.cs @@ -61,7 +61,7 @@ public partial interface ISynchronizationSettingsOperations /// Adds a new synchronization setting to an existing share. /// /// - /// Create or update a synchronizationSetting + /// Create a synchronizationSetting /// /// /// The resource group name. diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/InvitationsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/InvitationsOperations.cs index 4abaebeddebd..a08f51aff6c8 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/InvitationsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/InvitationsOperations.cs @@ -715,6 +715,12 @@ internal InvitationsOperations(DataShareManagementClient client) /// /// The continuation token /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// /// /// Headers that will be added to request. /// @@ -736,7 +742,7 @@ internal InvitationsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -769,6 +775,8 @@ internal InvitationsOperations(DataShareManagementClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareName", shareName); tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("filter", filter); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListByShare", tracingParameters); } @@ -788,6 +796,14 @@ internal InvitationsOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/InvitationsOperationsExtensions.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/InvitationsOperationsExtensions.cs index c8670b28a37f..59bfe6e30847 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/InvitationsOperationsExtensions.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/InvitationsOperationsExtensions.cs @@ -219,9 +219,15 @@ public static void Delete(this IInvitationsOperations operations, string resourc /// /// The continuation token /// - public static IPage ListByShare(this IInvitationsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string)) + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// + public static IPage ListByShare(this IInvitationsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string)) { - return operations.ListByShareAsync(resourceGroupName, accountName, shareName, skipToken).GetAwaiter().GetResult(); + return operations.ListByShareAsync(resourceGroupName, accountName, shareName, skipToken, filter, orderby).GetAwaiter().GetResult(); } /// @@ -245,12 +251,18 @@ public static void Delete(this IInvitationsOperations operations, string resourc /// /// The continuation token /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// /// /// The cancellation token. /// - public static async Task> ListByShareAsync(this IInvitationsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByShareAsync(this IInvitationsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByShareWithHttpMessagesAsync(resourceGroupName, accountName, shareName, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByShareWithHttpMessagesAsync(resourceGroupName, accountName, shareName, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen1FileDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen1FileDataSet.cs index 5928d47e607f..fa048e5bd8fe 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen1FileDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen1FileDataSet.cs @@ -42,11 +42,12 @@ public ADLSGen1FileDataSet() /// account. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public ADLSGen1FileDataSet(string accountName, string fileName, string folderPath, string resourceGroup, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public ADLSGen1FileDataSet(string accountName, string fileName, string folderPath, string resourceGroup, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { AccountName = accountName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen1FolderDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen1FolderDataSet.cs index 056d4d69dcf4..7f664644d420 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen1FolderDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen1FolderDataSet.cs @@ -41,11 +41,12 @@ public ADLSGen1FolderDataSet() /// account. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public ADLSGen1FolderDataSet(string accountName, string folderPath, string resourceGroup, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public ADLSGen1FolderDataSet(string accountName, string folderPath, string resourceGroup, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { AccountName = accountName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileDataSet.cs index 92c8ae2b32d3..5e95ac11dd65 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileDataSet.cs @@ -44,11 +44,12 @@ public ADLSGen2FileDataSet() /// account /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public ADLSGen2FileDataSet(string filePath, string fileSystem, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public ADLSGen2FileDataSet(string filePath, string fileSystem, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; FilePath = filePath; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileDataSetMapping.cs index c099a9638afd..1ff709fc901e 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileDataSetMapping.cs @@ -45,6 +45,7 @@ public ADLSGen2FileDataSetMapping() /// account. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' @@ -53,8 +54,8 @@ public ADLSGen2FileDataSetMapping() /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public ADLSGen2FileDataSetMapping(string dataSetId, string filePath, string fileSystem, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string outputType = default(string), string provisioningState = default(string)) - : base(id, name, type) + public ADLSGen2FileDataSetMapping(string dataSetId, string filePath, string fileSystem, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string outputType = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; DataSetMappingStatus = dataSetMappingStatus; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileSystemDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileSystemDataSet.cs index a3125d86d880..2b90a8832b3e 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileSystemDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileSystemDataSet.cs @@ -42,11 +42,12 @@ public ADLSGen2FileSystemDataSet() /// account /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public ADLSGen2FileSystemDataSet(string fileSystem, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public ADLSGen2FileSystemDataSet(string fileSystem, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; FileSystem = fileSystem; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileSystemDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileSystemDataSetMapping.cs index 4ffe535a7f1f..79acbc5fe685 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileSystemDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FileSystemDataSetMapping.cs @@ -45,14 +45,15 @@ public ADLSGen2FileSystemDataSetMapping() /// account. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public ADLSGen2FileSystemDataSetMapping(string dataSetId, string fileSystem, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) - : base(id, name, type) + public ADLSGen2FileSystemDataSetMapping(string dataSetId, string fileSystem, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; DataSetMappingStatus = dataSetMappingStatus; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FolderDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FolderDataSet.cs index fedc5729afd5..a0022004cbea 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FolderDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FolderDataSet.cs @@ -45,11 +45,12 @@ public ADLSGen2FolderDataSet() /// account /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public ADLSGen2FolderDataSet(string fileSystem, string folderPath, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public ADLSGen2FolderDataSet(string fileSystem, string folderPath, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; FileSystem = fileSystem; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FolderDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FolderDataSetMapping.cs index 32ff23965ed9..006e6b794b1a 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FolderDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ADLSGen2FolderDataSetMapping.cs @@ -48,14 +48,15 @@ public ADLSGen2FolderDataSetMapping() /// account. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public ADLSGen2FolderDataSetMapping(string dataSetId, string fileSystem, string folderPath, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) - : base(id, name, type) + public ADLSGen2FolderDataSetMapping(string dataSetId, string fileSystem, string folderPath, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; DataSetMappingStatus = dataSetMappingStatus; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Account.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Account.cs index c1d2d681277b..5f7ef1a2351b 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Account.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Account.cs @@ -36,10 +36,11 @@ public Account() /// /// Identity Info on the Account /// The resource id of the azure resource - /// Location of the azure resource. /// Name of the azure resource - /// Tags on the azure resource. + /// System Data of the Azure resource. /// Type of the azure resource + /// Location of the azure resource. + /// Tags on the azure resource. /// Time at which the account was /// created. /// Provisioning state of the Account. @@ -49,8 +50,8 @@ public Account() /// resource /// Name of the user who created the /// resource - public Account(Identity identity, string id = default(string), string location = default(string), string name = default(string), IDictionary tags = default(IDictionary), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), string provisioningState = default(string), string userEmail = default(string), string userName = default(string)) - : base(id, location, name, tags, type) + public Account(Identity identity, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), System.DateTime? createdAt = default(System.DateTime?), string provisioningState = default(string), string userEmail = default(string), string userName = default(string)) + : base(id, name, systemData, type, location, tags) { Identity = identity; CreatedAt = createdAt; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobContainerDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobContainerDataSet.cs index 0ded39b11456..7086662f5754 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobContainerDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobContainerDataSet.cs @@ -42,11 +42,12 @@ public BlobContainerDataSet() /// account /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public BlobContainerDataSet(string containerName, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public BlobContainerDataSet(string containerName, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { ContainerName = containerName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobContainerDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobContainerDataSetMapping.cs index fb61639e380e..20d47d9c4fc4 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobContainerDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobContainerDataSetMapping.cs @@ -45,14 +45,15 @@ public BlobContainerDataSetMapping() /// account. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public BlobContainerDataSetMapping(string containerName, string dataSetId, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) - : base(id, name, type) + public BlobContainerDataSetMapping(string containerName, string dataSetId, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { ContainerName = containerName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobDataSet.cs index acbdc70ae9c1..ef630377aae7 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobDataSet.cs @@ -44,11 +44,12 @@ public BlobDataSet() /// account /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public BlobDataSet(string containerName, string filePath, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public BlobDataSet(string containerName, string filePath, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { ContainerName = containerName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobDataSetMapping.cs index 8306b5a3f0d7..a4b2b8df37b9 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobDataSetMapping.cs @@ -45,6 +45,7 @@ public BlobDataSetMapping() /// account. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' @@ -53,8 +54,8 @@ public BlobDataSetMapping() /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public BlobDataSetMapping(string containerName, string dataSetId, string filePath, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string outputType = default(string), string provisioningState = default(string)) - : base(id, name, type) + public BlobDataSetMapping(string containerName, string dataSetId, string filePath, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string outputType = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { ContainerName = containerName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobFolderDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobFolderDataSet.cs index a5c0210fcdb0..494cb4cd6979 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobFolderDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobFolderDataSet.cs @@ -44,11 +44,12 @@ public BlobFolderDataSet() /// account /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public BlobFolderDataSet(string containerName, string prefix, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public BlobFolderDataSet(string containerName, string prefix, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { ContainerName = containerName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobFolderDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobFolderDataSetMapping.cs index ecbd849249d1..54da34c5468e 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobFolderDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/BlobFolderDataSetMapping.cs @@ -45,14 +45,15 @@ public BlobFolderDataSetMapping() /// account. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public BlobFolderDataSetMapping(string containerName, string dataSetId, string prefix, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) - : base(id, name, type) + public BlobFolderDataSetMapping(string containerName, string dataSetId, string prefix, string resourceGroup, string storageAccountName, string subscriptionId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { ContainerName = containerName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ConsumerInvitation.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ConsumerInvitation.cs index ef5391ffc267..001861f5c8d3 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ConsumerInvitation.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ConsumerInvitation.cs @@ -35,10 +35,13 @@ public ConsumerInvitation() /// Unique id of the invitation. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Number of data sets in a share /// Description shared when the invitation /// was created + /// The expiration date for the share + /// subscription created by accepting the invitation. /// The status of the invitation. /// Possible values include: 'Pending', 'Accepted', 'Rejected', /// 'Withdrawn' @@ -60,11 +63,12 @@ public ConsumerInvitation() /// resource /// Name of the user who created the /// resource - public ConsumerInvitation(string invitationId, string id = default(string), string name = default(string), string type = default(string), int? dataSetCount = default(int?), string description = default(string), string invitationStatus = default(string), string location = default(string), string providerEmail = default(string), string providerName = default(string), string providerTenantName = default(string), System.DateTime? respondedAt = default(System.DateTime?), System.DateTime? sentAt = default(System.DateTime?), string shareName = default(string), string termsOfUse = default(string), string userEmail = default(string), string userName = default(string)) - : base(id, name, type) + public ConsumerInvitation(string invitationId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), int? dataSetCount = default(int?), string description = default(string), System.DateTime? expirationDate = default(System.DateTime?), string invitationStatus = default(string), string location = default(string), string providerEmail = default(string), string providerName = default(string), string providerTenantName = default(string), System.DateTime? respondedAt = default(System.DateTime?), System.DateTime? sentAt = default(System.DateTime?), string shareName = default(string), string termsOfUse = default(string), string userEmail = default(string), string userName = default(string)) + : base(id, name, systemData, type) { DataSetCount = dataSetCount; Description = description; + ExpirationDate = expirationDate; InvitationId = invitationId; InvitationStatus = invitationStatus; Location = location; @@ -97,6 +101,13 @@ public ConsumerInvitation() [JsonProperty(PropertyName = "properties.description")] public string Description { get; private set; } + /// + /// Gets the expiration date for the share subscription created by + /// accepting the invitation. + /// + [JsonProperty(PropertyName = "properties.expirationDate")] + public System.DateTime? ExpirationDate { get; private set; } + /// /// Gets or sets unique id of the invitation. /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ConsumerSourceDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ConsumerSourceDataSet.cs index 97d083aee25c..239c968500dc 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ConsumerSourceDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ConsumerSourceDataSet.cs @@ -34,6 +34,7 @@ public ConsumerSourceDataSet() /// /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// DataSet Id /// Location of the data set. @@ -42,9 +43,10 @@ public ConsumerSourceDataSet() /// Type of data set. Possible values /// include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', /// 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', - /// 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' - public ConsumerSourceDataSet(string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string), string dataSetLocation = default(string), string dataSetName = default(string), string dataSetPath = default(string), string dataSetType = default(string)) - : base(id, name, type) + /// 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + /// 'SynapseWorkspaceSqlPoolTable' + public ConsumerSourceDataSet(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string), string dataSetLocation = default(string), string dataSetName = default(string), string dataSetPath = default(string), string dataSetType = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; DataSetLocation = dataSetLocation; @@ -87,7 +89,8 @@ public ConsumerSourceDataSet() /// Gets type of data set. Possible values include: 'Blob', /// 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', /// 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', - /// 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' + /// 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + /// 'SynapseWorkspaceSqlPoolTable' /// [JsonProperty(PropertyName = "properties.dataSetType")] public string DataSetType { get; private set; } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/CreatedByType.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/CreatedByType.cs new file mode 100644 index 000000000000..37d9a4cff635 --- /dev/null +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/CreatedByType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataShare.Models +{ + + /// + /// Defines values for CreatedByType. + /// + public static class CreatedByType + { + public const string User = "User"; + public const string Application = "Application"; + public const string ManagedIdentity = "ManagedIdentity"; + public const string Key = "Key"; + } +} diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSet.cs index f453cb9d4d1f..3136fc877dca 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSet.cs @@ -10,13 +10,11 @@ namespace Microsoft.Azure.Management.DataShare.Models { - using Newtonsoft.Json; using System.Linq; /// /// A DataSet data transfer object. /// - [Newtonsoft.Json.JsonObject("DataSet")] public partial class DataSet : ProxyDto { /// @@ -32,9 +30,10 @@ public DataSet() /// /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource - public DataSet(string id = default(string), string name = default(string), string type = default(string)) - : base(id, name, type) + public DataSet(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string)) + : base(id, name, systemData, type) { CustomInit(); } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSetMapping.cs index ee11f00c0e10..8c9fb86d05cf 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSetMapping.cs @@ -10,13 +10,11 @@ namespace Microsoft.Azure.Management.DataShare.Models { - using Newtonsoft.Json; using System.Linq; /// /// A data set mapping data transfer object. /// - [Newtonsoft.Json.JsonObject("DataSetMapping")] public partial class DataSetMapping : ProxyDto { /// @@ -32,9 +30,10 @@ public DataSetMapping() /// /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource - public DataSetMapping(string id = default(string), string name = default(string), string type = default(string)) - : base(id, name, type) + public DataSetMapping(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string)) + : base(id, name, systemData, type) { CustomInit(); } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSetType.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSetType.cs index e9414977eabd..be73fb816796 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSetType.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DataSetType.cs @@ -28,5 +28,6 @@ public static class DataSetType public const string KustoDatabase = "KustoDatabase"; public const string SqlDBTable = "SqlDBTable"; public const string SqlDWTable = "SqlDWTable"; + public const string SynapseWorkspaceSqlPoolTable = "SynapseWorkspaceSqlPoolTable"; } } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DefaultDto.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DefaultDto.cs index 4027683eb15e..75fc2f9cfc32 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DefaultDto.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/DefaultDto.cs @@ -10,8 +10,6 @@ namespace Microsoft.Azure.Management.DataShare.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -20,7 +18,7 @@ namespace Microsoft.Azure.Management.DataShare.Models /// /// Base data transfer object implementation for default resources. /// - public partial class DefaultDto : IResource + public partial class DefaultDto : ProxyDto { /// /// Initializes a new instance of the DefaultDto class. @@ -34,17 +32,16 @@ public DefaultDto() /// Initializes a new instance of the DefaultDto class. /// /// The resource id of the azure resource - /// Location of the azure resource. /// Name of the azure resource - /// Tags on the azure resource. + /// System Data of the Azure resource. /// Type of the azure resource - public DefaultDto(string id = default(string), string location = default(string), string name = default(string), IDictionary tags = default(IDictionary), string type = default(string)) + /// Location of the azure resource. + /// Tags on the azure resource. + public DefaultDto(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary)) + : base(id, name, systemData, type) { - Id = id; Location = location; - Name = name; Tags = tags; - Type = type; CustomInit(); } @@ -53,35 +50,17 @@ public DefaultDto() /// partial void CustomInit(); - /// - /// Gets the resource id of the azure resource - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - /// /// Gets or sets location of the azure resource. /// [JsonProperty(PropertyName = "location")] public string Location { get; set; } - /// - /// Gets name of the azure resource - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - /// /// Gets or sets tags on the azure resource. /// [JsonProperty(PropertyName = "tags")] public IDictionary Tags { get; set; } - /// - /// Gets type of the azure resource - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - } } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Invitation.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Invitation.cs index d9993887848b..ac064c1eaff6 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Invitation.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Invitation.cs @@ -34,7 +34,10 @@ public Invitation() /// /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource + /// The expiration date for the invitation + /// and share subscription. /// unique invitation id /// The status of the invitation. /// Possible values include: 'Pending', 'Accepted', 'Rejected', @@ -57,9 +60,10 @@ public Invitation() /// resource /// Name of the user who created the /// resource - public Invitation(string id = default(string), string name = default(string), string type = default(string), string invitationId = default(string), string invitationStatus = default(string), System.DateTime? respondedAt = default(System.DateTime?), System.DateTime? sentAt = default(System.DateTime?), string targetActiveDirectoryId = default(string), string targetEmail = default(string), string targetObjectId = default(string), string userEmail = default(string), string userName = default(string)) - : base(id, name, type) + public Invitation(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), System.DateTime? expirationDate = default(System.DateTime?), string invitationId = default(string), string invitationStatus = default(string), System.DateTime? respondedAt = default(System.DateTime?), System.DateTime? sentAt = default(System.DateTime?), string targetActiveDirectoryId = default(string), string targetEmail = default(string), string targetObjectId = default(string), string userEmail = default(string), string userName = default(string)) + : base(id, name, systemData, type) { + ExpirationDate = expirationDate; InvitationId = invitationId; InvitationStatus = invitationStatus; RespondedAt = respondedAt; @@ -77,6 +81,13 @@ public Invitation() /// partial void CustomInit(); + /// + /// Gets or sets the expiration date for the invitation and share + /// subscription. + /// + [JsonProperty(PropertyName = "properties.expirationDate")] + public System.DateTime? ExpirationDate { get; set; } + /// /// Gets unique invitation id /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoClusterDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoClusterDataSet.cs index 041809fd8b2a..693222c4515f 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoClusterDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoClusterDataSet.cs @@ -37,6 +37,7 @@ public KustoClusterDataSet() /// cluster. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource @@ -44,8 +45,8 @@ public KustoClusterDataSet() /// Provisioning state of the kusto /// cluster data set. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public KustoClusterDataSet(string kustoClusterResourceId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string), string location = default(string), string provisioningState = default(string)) - : base(id, name, type) + public KustoClusterDataSet(string kustoClusterResourceId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string), string location = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; KustoClusterResourceId = kustoClusterResourceId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoClusterDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoClusterDataSetMapping.cs index e3a7b4afbc1a..d00eee60308a 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoClusterDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoClusterDataSetMapping.cs @@ -38,6 +38,7 @@ public KustoClusterDataSetMapping() /// cluster. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' @@ -45,8 +46,8 @@ public KustoClusterDataSetMapping() /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public KustoClusterDataSetMapping(string dataSetId, string kustoClusterResourceId, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string location = default(string), string provisioningState = default(string)) - : base(id, name, type) + public KustoClusterDataSetMapping(string dataSetId, string kustoClusterResourceId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string location = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; DataSetMappingStatus = dataSetMappingStatus; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoDatabaseDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoDatabaseDataSet.cs index a16ee6626fd4..38d13016f065 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoDatabaseDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoDatabaseDataSet.cs @@ -37,6 +37,7 @@ public KustoDatabaseDataSet() /// database. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource @@ -44,8 +45,8 @@ public KustoDatabaseDataSet() /// Provisioning state of the kusto /// database data set. Possible values include: 'Succeeded', /// 'Creating', 'Deleting', 'Moving', 'Failed' - public KustoDatabaseDataSet(string kustoDatabaseResourceId, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string), string location = default(string), string provisioningState = default(string)) - : base(id, name, type) + public KustoDatabaseDataSet(string kustoDatabaseResourceId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string), string location = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; KustoDatabaseResourceId = kustoDatabaseResourceId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoDatabaseDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoDatabaseDataSetMapping.cs index ce2372f0ec84..20ab836a3564 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoDatabaseDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/KustoDatabaseDataSetMapping.cs @@ -40,6 +40,7 @@ public KustoDatabaseDataSetMapping() /// cluster. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' @@ -47,8 +48,8 @@ public KustoDatabaseDataSetMapping() /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public KustoDatabaseDataSetMapping(string dataSetId, string kustoClusterResourceId, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string location = default(string), string provisioningState = default(string)) - : base(id, name, type) + public KustoDatabaseDataSetMapping(string dataSetId, string kustoClusterResourceId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string location = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; DataSetMappingStatus = dataSetMappingStatus; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/LastModifiedByType.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/LastModifiedByType.cs new file mode 100644 index 000000000000..248afba76bac --- /dev/null +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/LastModifiedByType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataShare.Models +{ + + /// + /// Defines values for LastModifiedByType. + /// + public static class LastModifiedByType + { + public const string User = "User"; + public const string Application = "Application"; + public const string ManagedIdentity = "ManagedIdentity"; + public const string Key = "Key"; + } +} diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/OperationMetaMetricSpecification.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/OperationMetaMetricSpecification.cs index 5e9c0c65287c..5c98ff3275fa 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/OperationMetaMetricSpecification.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/OperationMetaMetricSpecification.cs @@ -39,6 +39,7 @@ public OperationMetaMetricSpecification() /// localized name of the metric /// enable regional mdm /// account + /// fill gap with zero /// internal metric name /// name of the metric /// dimension name use to @@ -48,13 +49,14 @@ public OperationMetaMetricSpecification() /// supported time grain /// types /// units for the metric - public OperationMetaMetricSpecification(string aggregationType = default(string), IList dimensions = default(IList), string displayDescription = default(string), string displayName = default(string), string enableRegionalMdmAccount = default(string), string internalMetricName = default(string), string name = default(string), string resourceIdDimensionNameOverride = default(string), IList supportedAggregationTypes = default(IList), IList supportedTimeGrainTypes = default(IList), string unit = default(string)) + public OperationMetaMetricSpecification(string aggregationType = default(string), IList dimensions = default(IList), string displayDescription = default(string), string displayName = default(string), string enableRegionalMdmAccount = default(string), bool? fillGapWithZero = default(bool?), string internalMetricName = default(string), string name = default(string), string resourceIdDimensionNameOverride = default(string), IList supportedAggregationTypes = default(IList), IList supportedTimeGrainTypes = default(IList), string unit = default(string)) { AggregationType = aggregationType; Dimensions = dimensions; DisplayDescription = displayDescription; DisplayName = displayName; EnableRegionalMdmAccount = enableRegionalMdmAccount; + FillGapWithZero = fillGapWithZero; InternalMetricName = internalMetricName; Name = name; ResourceIdDimensionNameOverride = resourceIdDimensionNameOverride; @@ -99,6 +101,12 @@ public OperationMetaMetricSpecification() [JsonProperty(PropertyName = "enableRegionalMdmAccount")] public string EnableRegionalMdmAccount { get; set; } + /// + /// Gets or sets fill gap with zero + /// + [JsonProperty(PropertyName = "fillGapWithZero")] + public bool? FillGapWithZero { get; set; } + /// /// Gets or sets internal metric name /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ProviderShareSubscription.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ProviderShareSubscription.cs index 3e61b7dba519..335754a8cb01 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ProviderShareSubscription.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ProviderShareSubscription.cs @@ -34,6 +34,7 @@ public ProviderShareSubscription() /// /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Email of the consumer who created the /// share subscription @@ -42,6 +43,8 @@ public ProviderShareSubscription() /// Tenant name of the consumer who /// created the share subscription /// created at + /// Expiration date of the share + /// subscription in UTC format /// Email of the provider who created the /// share /// Name of the provider who created the @@ -52,13 +55,14 @@ public ProviderShareSubscription() /// Gets the status of share /// subscription. Possible values include: 'Active', 'Revoked', /// 'SourceDeleted', 'Revoking' - public ProviderShareSubscription(string id = default(string), string name = default(string), string type = default(string), string consumerEmail = default(string), string consumerName = default(string), string consumerTenantName = default(string), System.DateTime? createdAt = default(System.DateTime?), string providerEmail = default(string), string providerName = default(string), System.DateTime? sharedAt = default(System.DateTime?), string shareSubscriptionObjectId = default(string), string shareSubscriptionStatus = default(string)) - : base(id, name, type) + public ProviderShareSubscription(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string consumerEmail = default(string), string consumerName = default(string), string consumerTenantName = default(string), System.DateTime? createdAt = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), string providerEmail = default(string), string providerName = default(string), System.DateTime? sharedAt = default(System.DateTime?), string shareSubscriptionObjectId = default(string), string shareSubscriptionStatus = default(string)) + : base(id, name, systemData, type) { ConsumerEmail = consumerEmail; ConsumerName = consumerName; ConsumerTenantName = consumerTenantName; CreatedAt = createdAt; + ExpirationDate = expirationDate; ProviderEmail = providerEmail; ProviderName = providerName; SharedAt = sharedAt; @@ -96,6 +100,13 @@ public ProviderShareSubscription() [JsonProperty(PropertyName = "properties.createdAt")] public System.DateTime? CreatedAt { get; private set; } + /// + /// Gets or sets expiration date of the share subscription in UTC + /// format + /// + [JsonProperty(PropertyName = "properties.expirationDate")] + public System.DateTime? ExpirationDate { get; set; } + /// /// Gets email of the provider who created the share /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ProxyDto.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ProxyDto.cs index 1aa82fc21306..3f8c669d61c7 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ProxyDto.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ProxyDto.cs @@ -33,11 +33,13 @@ public ProxyDto() /// /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource - public ProxyDto(string id = default(string), string name = default(string), string type = default(string)) + public ProxyDto(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string)) { Id = id; Name = name; + SystemData = systemData; Type = type; CustomInit(); } @@ -59,6 +61,12 @@ public ProxyDto() [JsonProperty(PropertyName = "name")] public string Name { get; private set; } + /// + /// Gets system Data of the Azure resource. + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + /// /// Gets type of the azure resource /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ScheduledSynchronizationSetting.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ScheduledSynchronizationSetting.cs index 55e9688ae6de..cc1b0391826c 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ScheduledSynchronizationSetting.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ScheduledSynchronizationSetting.cs @@ -40,6 +40,7 @@ public ScheduledSynchronizationSetting() /// Synchronization time /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Time at which the synchronization setting /// was created. @@ -48,8 +49,8 @@ public ScheduledSynchronizationSetting() /// 'Deleting', 'Moving', 'Failed' /// Name of the user who created the /// synchronization setting. - public ScheduledSynchronizationSetting(string recurrenceInterval, System.DateTime synchronizationTime, string id = default(string), string name = default(string), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), string provisioningState = default(string), string userName = default(string)) - : base(id, name, type) + public ScheduledSynchronizationSetting(string recurrenceInterval, System.DateTime synchronizationTime, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), string provisioningState = default(string), string userName = default(string)) + : base(id, name, systemData, type) { CreatedAt = createdAt; ProvisioningState = provisioningState; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ScheduledTrigger.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ScheduledTrigger.cs index e94010bb02b6..64728cb5f499 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ScheduledTrigger.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ScheduledTrigger.cs @@ -38,6 +38,7 @@ public ScheduledTrigger() /// Synchronization time /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Time at which the trigger was /// created. @@ -51,8 +52,8 @@ public ScheduledTrigger() /// 'SourceSynchronizationSettingDeleted' /// Name of the user who created the /// trigger. - public ScheduledTrigger(string recurrenceInterval, System.DateTime synchronizationTime, string id = default(string), string name = default(string), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), string provisioningState = default(string), string synchronizationMode = default(string), string triggerStatus = default(string), string userName = default(string)) - : base(id, name, type) + public ScheduledTrigger(string recurrenceInterval, System.DateTime synchronizationTime, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), string provisioningState = default(string), string synchronizationMode = default(string), string triggerStatus = default(string), string userName = default(string)) + : base(id, name, systemData, type) { CreatedAt = createdAt; ProvisioningState = provisioningState; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Share.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Share.cs index d185c361bb05..ae89fff26881 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Share.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Share.cs @@ -34,6 +34,7 @@ public Share() /// /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Time at which the share was /// created. @@ -48,8 +49,8 @@ public Share() /// resource /// Name of the user who created the /// resource - public Share(string id = default(string), string name = default(string), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), string description = default(string), string provisioningState = default(string), string shareKind = default(string), string terms = default(string), string userEmail = default(string), string userName = default(string)) - : base(id, name, type) + public Share(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), string description = default(string), string provisioningState = default(string), string shareKind = default(string), string terms = default(string), string userEmail = default(string), string userName = default(string)) + : base(id, name, systemData, type) { CreatedAt = createdAt; Description = description; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ShareSubscription.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ShareSubscription.cs index 2a64feb45003..b764436addaa 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ShareSubscription.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/ShareSubscription.cs @@ -36,9 +36,12 @@ public ShareSubscription() /// Source share location. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Time at which the share subscription was /// created. + /// The expiration date of the share + /// subscription. /// Email of the provider who created the /// resource /// Name of the provider who created the @@ -60,10 +63,11 @@ public ShareSubscription() /// resource /// Name of the user who created the /// resource - public ShareSubscription(string invitationId, string sourceShareLocation, string id = default(string), string name = default(string), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), string providerEmail = default(string), string providerName = default(string), string providerTenantName = default(string), string provisioningState = default(string), string shareDescription = default(string), string shareKind = default(string), string shareName = default(string), string shareSubscriptionStatus = default(string), string shareTerms = default(string), string userEmail = default(string), string userName = default(string)) - : base(id, name, type) + public ShareSubscription(string invitationId, string sourceShareLocation, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), string providerEmail = default(string), string providerName = default(string), string providerTenantName = default(string), string provisioningState = default(string), string shareDescription = default(string), string shareKind = default(string), string shareName = default(string), string shareSubscriptionStatus = default(string), string shareTerms = default(string), string userEmail = default(string), string userName = default(string)) + : base(id, name, systemData, type) { CreatedAt = createdAt; + ExpirationDate = expirationDate; InvitationId = invitationId; ProviderEmail = providerEmail; ProviderName = providerName; @@ -91,6 +95,12 @@ public ShareSubscription() [JsonProperty(PropertyName = "properties.createdAt")] public System.DateTime? CreatedAt { get; private set; } + /// + /// Gets or sets the expiration date of the share subscription. + /// + [JsonProperty(PropertyName = "properties.expirationDate")] + public System.DateTime? ExpirationDate { get; set; } + /// /// Gets or sets the invitation id. /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SourceShareSynchronizationSetting.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SourceShareSynchronizationSetting.cs index c34d9f9393f7..f15fbd2b7318 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SourceShareSynchronizationSetting.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SourceShareSynchronizationSetting.cs @@ -10,13 +10,11 @@ namespace Microsoft.Azure.Management.DataShare.Models { - using Newtonsoft.Json; using System.Linq; /// /// A view of synchronization setting added by the provider /// - [Newtonsoft.Json.JsonObject("SourceShareSynchronizationSetting")] public partial class SourceShareSynchronizationSetting { /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDBTableDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDBTableDataSet.cs index 0d63e5a3c951..04a4afa37602 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDBTableDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDBTableDataSet.cs @@ -41,11 +41,12 @@ public SqlDBTableDataSet() /// SQL DB table name. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public SqlDBTableDataSet(string databaseName, string schemaName, string sqlServerResourceId, string tableName, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public SqlDBTableDataSet(string databaseName, string schemaName, string sqlServerResourceId, string tableName, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { DatabaseName = databaseName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDBTableDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDBTableDataSetMapping.cs index 8612eddcc66b..fcc5cccc94e2 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDBTableDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDBTableDataSetMapping.cs @@ -42,14 +42,15 @@ public SqlDBTableDataSetMapping() /// SQL DB table name. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public SqlDBTableDataSetMapping(string databaseName, string dataSetId, string schemaName, string sqlServerResourceId, string tableName, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) - : base(id, name, type) + public SqlDBTableDataSetMapping(string databaseName, string dataSetId, string schemaName, string sqlServerResourceId, string tableName, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { DatabaseName = databaseName; DataSetId = dataSetId; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDWTableDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDWTableDataSet.cs index fed87f3c487d..de9ccdf69916 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDWTableDataSet.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDWTableDataSet.cs @@ -41,11 +41,12 @@ public SqlDWTableDataSet() /// SQL DW table name. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Unique id for identifying a data set /// resource - public SqlDWTableDataSet(string dataWarehouseName, string schemaName, string sqlServerResourceId, string tableName, string id = default(string), string name = default(string), string type = default(string), string dataSetId = default(string)) - : base(id, name, type) + public SqlDWTableDataSet(string dataWarehouseName, string schemaName, string sqlServerResourceId, string tableName, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; DataWarehouseName = dataWarehouseName; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDWTableDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDWTableDataSetMapping.cs index 530ff23af048..25ee0df297e1 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDWTableDataSetMapping.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SqlDWTableDataSetMapping.cs @@ -42,14 +42,15 @@ public SqlDWTableDataSetMapping() /// SQL DW table name. /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource /// Gets the status of the data set /// mapping. Possible values include: 'Ok', 'Broken' /// Provisioning state of the data set /// mapping. Possible values include: 'Succeeded', 'Creating', /// 'Deleting', 'Moving', 'Failed' - public SqlDWTableDataSetMapping(string dataSetId, string dataWarehouseName, string schemaName, string sqlServerResourceId, string tableName, string id = default(string), string name = default(string), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) - : base(id, name, type) + public SqlDWTableDataSetMapping(string dataSetId, string dataWarehouseName, string schemaName, string sqlServerResourceId, string tableName, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) { DataSetId = dataSetId; DataSetMappingStatus = dataSetMappingStatus; diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynapseWorkspaceSqlPoolTableDataSet.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynapseWorkspaceSqlPoolTableDataSet.cs new file mode 100644 index 000000000000..241319454e03 --- /dev/null +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynapseWorkspaceSqlPoolTableDataSet.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataShare.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Synapse Workspace Sql Pool Table data set. + /// + [Newtonsoft.Json.JsonObject("SynapseWorkspaceSqlPoolTable")] + [Rest.Serialization.JsonTransformation] + public partial class SynapseWorkspaceSqlPoolTableDataSet : DataSet + { + /// + /// Initializes a new instance of the + /// SynapseWorkspaceSqlPoolTableDataSet class. + /// + public SynapseWorkspaceSqlPoolTableDataSet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SynapseWorkspaceSqlPoolTableDataSet class. + /// + /// Resource id of + /// the Synapse Workspace SQL Pool Table + /// The resource id of the azure resource + /// Name of the azure resource + /// System Data of the Azure resource. + /// Type of the azure resource + /// Unique id for identifying a data set + /// resource + public SynapseWorkspaceSqlPoolTableDataSet(string synapseWorkspaceSqlPoolTableResourceId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetId = default(string)) + : base(id, name, systemData, type) + { + DataSetId = dataSetId; + SynapseWorkspaceSqlPoolTableResourceId = synapseWorkspaceSqlPoolTableResourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets unique id for identifying a data set resource + /// + [JsonProperty(PropertyName = "properties.dataSetId")] + public string DataSetId { get; private set; } + + /// + /// Gets or sets resource id of the Synapse Workspace SQL Pool Table + /// + [JsonProperty(PropertyName = "properties.synapseWorkspaceSqlPoolTableResourceId")] + public string SynapseWorkspaceSqlPoolTableResourceId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SynapseWorkspaceSqlPoolTableResourceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SynapseWorkspaceSqlPoolTableResourceId"); + } + } + } +} diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynapseWorkspaceSqlPoolTableDataSetMapping.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynapseWorkspaceSqlPoolTableDataSetMapping.cs new file mode 100644 index 000000000000..f652a1903431 --- /dev/null +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynapseWorkspaceSqlPoolTableDataSetMapping.cs @@ -0,0 +1,109 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataShare.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A Synapse Workspace Sql Pool Table data set mapping + /// + [Newtonsoft.Json.JsonObject("SynapseWorkspaceSqlPoolTable")] + [Rest.Serialization.JsonTransformation] + public partial class SynapseWorkspaceSqlPoolTableDataSetMapping : DataSetMapping + { + /// + /// Initializes a new instance of the + /// SynapseWorkspaceSqlPoolTableDataSetMapping class. + /// + public SynapseWorkspaceSqlPoolTableDataSetMapping() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SynapseWorkspaceSqlPoolTableDataSetMapping class. + /// + /// The id of the source data set. + /// Resource id of + /// the Synapse Workspace SQL Pool Table + /// The resource id of the azure resource + /// Name of the azure resource + /// System Data of the Azure resource. + /// Type of the azure resource + /// Gets the status of the data set + /// mapping. Possible values include: 'Ok', 'Broken' + /// Provisioning state of the data set + /// mapping. Possible values include: 'Succeeded', 'Creating', + /// 'Deleting', 'Moving', 'Failed' + public SynapseWorkspaceSqlPoolTableDataSetMapping(string dataSetId, string synapseWorkspaceSqlPoolTableResourceId, string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string), string dataSetMappingStatus = default(string), string provisioningState = default(string)) + : base(id, name, systemData, type) + { + DataSetId = dataSetId; + DataSetMappingStatus = dataSetMappingStatus; + ProvisioningState = provisioningState; + SynapseWorkspaceSqlPoolTableResourceId = synapseWorkspaceSqlPoolTableResourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the id of the source data set. + /// + [JsonProperty(PropertyName = "properties.dataSetId")] + public string DataSetId { get; set; } + + /// + /// Gets the status of the data set mapping. Possible values include: + /// 'Ok', 'Broken' + /// + [JsonProperty(PropertyName = "properties.dataSetMappingStatus")] + public string DataSetMappingStatus { get; private set; } + + /// + /// Gets provisioning state of the data set mapping. Possible values + /// include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets or sets resource id of the Synapse Workspace SQL Pool Table + /// + [JsonProperty(PropertyName = "properties.synapseWorkspaceSqlPoolTableResourceId")] + public string SynapseWorkspaceSqlPoolTableResourceId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DataSetId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DataSetId"); + } + if (SynapseWorkspaceSqlPoolTableResourceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SynapseWorkspaceSqlPoolTableResourceId"); + } + } + } +} diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynchronizationDetails.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynchronizationDetails.cs index 2b7d20caf643..37d2265d4c2a 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynchronizationDetails.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynchronizationDetails.cs @@ -33,7 +33,8 @@ public SynchronizationDetails() /// Type of the data set. Possible values /// include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', /// 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', - /// 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' + /// 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + /// 'SynapseWorkspaceSqlPoolTable' /// Duration of data set level copy /// End time of data set level copy /// The number of files read from the source @@ -89,7 +90,8 @@ public SynchronizationDetails() /// Gets type of the data set. Possible values include: 'Blob', /// 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', /// 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', - /// 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' + /// 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + /// 'SynapseWorkspaceSqlPoolTable' /// [JsonProperty(PropertyName = "dataSetType")] public string DataSetType { get; private set; } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynchronizationSetting.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynchronizationSetting.cs index 559f90889fc7..570faf168cc8 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynchronizationSetting.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SynchronizationSetting.cs @@ -10,13 +10,11 @@ namespace Microsoft.Azure.Management.DataShare.Models { - using Newtonsoft.Json; using System.Linq; /// /// A Synchronization Setting data transfer object. /// - [Newtonsoft.Json.JsonObject("SynchronizationSetting")] public partial class SynchronizationSetting : ProxyDto { /// @@ -32,9 +30,10 @@ public SynchronizationSetting() /// /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource - public SynchronizationSetting(string id = default(string), string name = default(string), string type = default(string)) - : base(id, name, type) + public SynchronizationSetting(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string)) + : base(id, name, systemData, type) { CustomInit(); } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SystemData.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SystemData.cs new file mode 100644 index 000000000000..e0227762c23f --- /dev/null +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/SystemData.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataShare.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Metadata pertaining to creation and last modification of the resource. + /// + public partial class SystemData + { + /// + /// Initializes a new instance of the SystemData class. + /// + public SystemData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SystemData class. + /// + /// The timestamp of resource creation + /// (UTC). + /// The identity that created the + /// resource. + /// The type of identity that created the + /// resource. Possible values include: 'User', 'Application', + /// 'ManagedIdentity', 'Key' + /// The type of identity that last + /// modified the resource. + /// The identity that last modified the + /// resource. + /// The type of identity that last + /// modified the resource. Possible values include: 'User', + /// 'Application', 'ManagedIdentity', 'Key' + public SystemData(System.DateTime? createdAt = default(System.DateTime?), string createdBy = default(string), string createdByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string)) + { + CreatedAt = createdAt; + CreatedBy = createdBy; + CreatedByType = createdByType; + LastModifiedAt = lastModifiedAt; + LastModifiedBy = lastModifiedBy; + LastModifiedByType = lastModifiedByType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the timestamp of resource creation (UTC). + /// + [JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt { get; set; } + + /// + /// Gets or sets the identity that created the resource. + /// + [JsonProperty(PropertyName = "createdBy")] + public string CreatedBy { get; set; } + + /// + /// Gets or sets the type of identity that created the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "createdByType")] + public string CreatedByType { get; set; } + + /// + /// Gets or sets the type of identity that last modified the resource. + /// + [JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt { get; set; } + + /// + /// Gets or sets the identity that last modified the resource. + /// + [JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy { get; set; } + + /// + /// Gets or sets the type of identity that last modified the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType { get; set; } + + } +} diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Trigger.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Trigger.cs index 6ef6d0f0d61d..8089484b64f6 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Trigger.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/Models/Trigger.cs @@ -10,13 +10,11 @@ namespace Microsoft.Azure.Management.DataShare.Models { - using Newtonsoft.Json; using System.Linq; /// /// A Trigger data transfer object. /// - [Newtonsoft.Json.JsonObject("Trigger")] public partial class Trigger : ProxyDto { /// @@ -32,9 +30,10 @@ public Trigger() /// /// The resource id of the azure resource /// Name of the azure resource + /// System Data of the Azure resource. /// Type of the azure resource - public Trigger(string id = default(string), string name = default(string), string type = default(string)) - : base(id, name, type) + public Trigger(string id = default(string), string name = default(string), SystemData systemData = default(SystemData), string type = default(string)) + : base(id, name, systemData, type) { CustomInit(); } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ProviderShareSubscriptionsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ProviderShareSubscriptionsOperations.cs index a1884a6b8708..51374b369f8f 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ProviderShareSubscriptionsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ProviderShareSubscriptionsOperations.cs @@ -51,10 +51,10 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) public DataShareManagementClient Client { get; private set; } /// - /// Get share subscription in a provider share. + /// Adjust the expiration date of a share subscription in a provider share. /// /// - /// Get share subscription in a provider share + /// Adjust a share subscription's expiration date in a provider share /// /// /// The resource group name. @@ -68,6 +68,9 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) /// /// To locate shareSubscription /// + /// + /// The provider share subscription + /// /// /// Headers that will be added to request. /// @@ -89,7 +92,7 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> AdjustWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, ProviderShareSubscription providerShareSubscription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -115,6 +118,10 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (providerShareSubscription == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "providerShareSubscription"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -126,12 +133,13 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareName", shareName); tracingParameters.Add("providerShareSubscriptionId", providerShareSubscriptionId); + tracingParameters.Add("providerShareSubscription", providerShareSubscription); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetByShare", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Adjust", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/adjust").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -149,7 +157,7 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -180,6 +188,12 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; + if(providerShareSubscription != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(providerShareSubscription, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -263,10 +277,10 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// List of available share subscriptions to a provider share. + /// Reinstate share subscription in a provider share. /// /// - /// List share subscriptions in a provider share + /// Reinstate share subscription in a provider share /// /// /// The resource group name. @@ -277,8 +291,11 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) /// /// The name of the share. /// - /// - /// Continuation Token + /// + /// To locate shareSubscription + /// + /// + /// The provider share subscription /// /// /// Headers that will be added to request. @@ -301,7 +318,7 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ReinstateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, ProviderShareSubscription providerShareSubscription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -319,10 +336,18 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); } + if (providerShareSubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "providerShareSubscriptionId"); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (providerShareSubscription == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "providerShareSubscription"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -333,26 +358,24 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareName", shareName); - tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("providerShareSubscriptionId", providerShareSubscriptionId); + tracingParameters.Add("providerShareSubscription", providerShareSubscription); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByShare", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Reinstate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/reinstate").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + _url = _url.Replace("{providerShareSubscriptionId}", System.Uri.EscapeDataString(providerShareSubscriptionId)); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -360,7 +383,7 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -391,6 +414,12 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; + if(providerShareSubscription != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(providerShareSubscription, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -441,7 +470,7 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -454,7 +483,7 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -505,10 +534,10 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// Reinstate share subscription in a provider share. + /// Get share subscription in a provider share. /// /// - /// Reinstate share subscription in a provider share + /// Get share subscription in a provider share /// /// /// The resource group name. @@ -543,7 +572,7 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ReinstateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -581,11 +610,11 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) tracingParameters.Add("shareName", shareName); tracingParameters.Add("providerShareSubscriptionId", providerShareSubscriptionId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Reinstate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "GetByShare", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/reinstate").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -603,7 +632,7 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -716,6 +745,217 @@ internal ProviderShareSubscriptionsOperations(DataShareManagementClient client) return _result; } + /// + /// List of available share subscriptions to a provider share. + /// + /// + /// List share subscriptions in a provider share + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The name of the share. + /// + /// + /// Continuation Token + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByShareWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareName", shareName); + tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByShare", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new DataShareErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + DataShareError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Revoke share subscription in a provider share. /// diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ProviderShareSubscriptionsOperationsExtensions.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ProviderShareSubscriptionsOperationsExtensions.cs index ddf703350b11..ddce07c7879a 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ProviderShareSubscriptionsOperationsExtensions.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ProviderShareSubscriptionsOperationsExtensions.cs @@ -22,10 +22,10 @@ namespace Microsoft.Azure.Management.DataShare public static partial class ProviderShareSubscriptionsOperationsExtensions { /// - /// Get share subscription in a provider share. + /// Adjust the expiration date of a share subscription in a provider share. /// /// - /// Get share subscription in a provider share + /// Adjust a share subscription's expiration date in a provider share /// /// /// The operations group for this extension method. @@ -42,16 +42,19 @@ public static partial class ProviderShareSubscriptionsOperationsExtensions /// /// To locate shareSubscription /// - public static ProviderShareSubscription GetByShare(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId) + /// + /// The provider share subscription + /// + public static ProviderShareSubscription Adjust(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, ProviderShareSubscription providerShareSubscription) { - return operations.GetByShareAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId).GetAwaiter().GetResult(); + return operations.AdjustAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId, providerShareSubscription).GetAwaiter().GetResult(); } /// - /// Get share subscription in a provider share. + /// Adjust the expiration date of a share subscription in a provider share. /// /// - /// Get share subscription in a provider share + /// Adjust a share subscription's expiration date in a provider share /// /// /// The operations group for this extension method. @@ -68,22 +71,25 @@ public static ProviderShareSubscription GetByShare(this IProviderShareSubscripti /// /// To locate shareSubscription /// + /// + /// The provider share subscription + /// /// /// The cancellation token. /// - public static async Task GetByShareAsync(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task AdjustAsync(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, ProviderShareSubscription providerShareSubscription, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetByShareWithHttpMessagesAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.AdjustWithHttpMessagesAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId, providerShareSubscription, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// List of available share subscriptions to a provider share. + /// Reinstate share subscription in a provider share. /// /// - /// List share subscriptions in a provider share + /// Reinstate share subscription in a provider share /// /// /// The operations group for this extension method. @@ -97,19 +103,22 @@ public static ProviderShareSubscription GetByShare(this IProviderShareSubscripti /// /// The name of the share. /// - /// - /// Continuation Token + /// + /// To locate shareSubscription /// - public static IPage ListByShare(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string)) + /// + /// The provider share subscription + /// + public static ProviderShareSubscription Reinstate(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, ProviderShareSubscription providerShareSubscription) { - return operations.ListByShareAsync(resourceGroupName, accountName, shareName, skipToken).GetAwaiter().GetResult(); + return operations.ReinstateAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId, providerShareSubscription).GetAwaiter().GetResult(); } /// - /// List of available share subscriptions to a provider share. + /// Reinstate share subscription in a provider share. /// /// - /// List share subscriptions in a provider share + /// Reinstate share subscription in a provider share /// /// /// The operations group for this extension method. @@ -123,15 +132,18 @@ public static ProviderShareSubscription GetByShare(this IProviderShareSubscripti /// /// The name of the share. /// - /// - /// Continuation Token + /// + /// To locate shareSubscription + /// + /// + /// The provider share subscription /// /// /// The cancellation token. /// - public static async Task> ListByShareAsync(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ReinstateAsync(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, ProviderShareSubscription providerShareSubscription, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByShareWithHttpMessagesAsync(resourceGroupName, accountName, shareName, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ReinstateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId, providerShareSubscription, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -196,10 +208,10 @@ public static ProviderShareSubscription Revoke(this IProviderShareSubscriptionsO } /// - /// Reinstate share subscription in a provider share. + /// Get share subscription in a provider share. /// /// - /// Reinstate share subscription in a provider share + /// Get share subscription in a provider share /// /// /// The operations group for this extension method. @@ -216,16 +228,16 @@ public static ProviderShareSubscription Revoke(this IProviderShareSubscriptionsO /// /// To locate shareSubscription /// - public static ProviderShareSubscription Reinstate(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId) + public static ProviderShareSubscription GetByShare(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId) { - return operations.ReinstateAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId).GetAwaiter().GetResult(); + return operations.GetByShareAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId).GetAwaiter().GetResult(); } /// - /// Reinstate share subscription in a provider share. + /// Get share subscription in a provider share. /// /// - /// Reinstate share subscription in a provider share + /// Get share subscription in a provider share /// /// /// The operations group for this extension method. @@ -245,9 +257,67 @@ public static ProviderShareSubscription Reinstate(this IProviderShareSubscriptio /// /// The cancellation token. /// - public static async Task ReinstateAsync(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetByShareAsync(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string providerShareSubscriptionId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetByShareWithHttpMessagesAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List of available share subscriptions to a provider share. + /// + /// + /// List share subscriptions in a provider share + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The name of the share. + /// + /// + /// Continuation Token + /// + public static IPage ListByShare(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string)) + { + return operations.ListByShareAsync(resourceGroupName, accountName, shareName, skipToken).GetAwaiter().GetResult(); + } + + /// + /// List of available share subscriptions to a provider share. + /// + /// + /// List share subscriptions in a provider share + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The name of the share. + /// + /// + /// Continuation Token + /// + /// + /// The cancellation token. + /// + public static async Task> ListByShareAsync(this IProviderShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ReinstateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, providerShareSubscriptionId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByShareWithHttpMessagesAsync(resourceGroupName, accountName, shareName, skipToken, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SdkInfo_DataShareManagementClient.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SdkInfo_DataShareManagementClient.cs index f7fd47faf8d0..9e615f01d498 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SdkInfo_DataShareManagementClient.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SdkInfo_DataShareManagementClient.cs @@ -19,31 +19,20 @@ public static IEnumerable> ApiInfo_DataShareManage { return new Tuple[] { - new Tuple("DataShare", "Accounts", "2019-11-01"), - new Tuple("DataShare", "ConsumerInvitations", "2019-11-01"), - new Tuple("DataShare", "ConsumerSourceDataSets", "2019-11-01"), - new Tuple("DataShare", "DataSetMappings", "2019-11-01"), - new Tuple("DataShare", "DataSets", "2019-11-01"), - new Tuple("DataShare", "Invitations", "2019-11-01"), - new Tuple("DataShare", "Operations", "2019-11-01"), - new Tuple("DataShare", "ProviderShareSubscriptions", "2019-11-01"), - new Tuple("DataShare", "ShareSubscriptions", "2019-11-01"), - new Tuple("DataShare", "Shares", "2019-11-01"), - new Tuple("DataShare", "SynchronizationSettings", "2019-11-01"), - new Tuple("DataShare", "Triggers", "2019-11-01"), + new Tuple("DataShare", "Accounts", "2020-09-01"), + new Tuple("DataShare", "ConsumerInvitations", "2020-09-01"), + new Tuple("DataShare", "ConsumerSourceDataSets", "2020-09-01"), + new Tuple("DataShare", "DataSetMappings", "2020-09-01"), + new Tuple("DataShare", "DataSets", "2020-09-01"), + new Tuple("DataShare", "Invitations", "2020-09-01"), + new Tuple("DataShare", "Operations", "2020-09-01"), + new Tuple("DataShare", "ProviderShareSubscriptions", "2020-09-01"), + new Tuple("DataShare", "ShareSubscriptions", "2020-09-01"), + new Tuple("DataShare", "Shares", "2020-09-01"), + new Tuple("DataShare", "SynchronizationSettings", "2020-09-01"), + new Tuple("DataShare", "Triggers", "2020-09-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "2.0.4413"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datashare/resource-manager/readme.md --csharp --version=2.0.4413 --reflect-api-versions --tag=package-2019-11-01 --csharp-sdks-folder=F:\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "9505236faa86b99b6dc58b5655d8e1c4a758d89c"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ShareSubscriptionsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ShareSubscriptionsOperations.cs index 9123fff70099..a71716897dad 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ShareSubscriptionsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ShareSubscriptionsOperations.cs @@ -51,10 +51,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) public DataShareManagementClient Client { get; private set; } /// - /// Get shareSubscription in an account. + /// Request cancellation of a data share snapshot /// /// - /// Get a shareSubscription in an account + /// Request to cancel a synchronization. /// /// /// The resource group name. @@ -65,6 +65,40 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// The name of the shareSubscription. /// + /// + /// Share Subscription Synchronization payload. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CancelSynchronizationWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginCancelSynchronizationWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get source share synchronization settings for a shareSubscription. + /// + /// + /// Get synchronization settings set on a share + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The name of the shareSubscription. + /// + /// + /// Continuation token + /// /// /// Headers that will be added to request. /// @@ -86,7 +120,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSourceShareSynchronizationSettingsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -118,12 +152,13 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareSubscriptionName", shareSubscriptionName); + tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSourceShareSynchronizationSettings", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -133,6 +168,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -140,7 +179,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -221,7 +260,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -234,7 +273,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -254,10 +293,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// Create shareSubscription in an account. + /// List data set level details for a share subscription synchronization /// /// - /// Create a shareSubscription in an account + /// List synchronization details /// /// /// The resource group name. @@ -266,10 +305,19 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// The name of the share account. /// /// - /// The name of the shareSubscription. + /// The name of the share subscription. /// - /// - /// create parameters for shareSubscription + /// + /// Share Subscription Synchronization payload. + /// + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// Headers that will be added to request. @@ -292,7 +340,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscription shareSubscription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSynchronizationDetailsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -310,13 +358,13 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionName"); } - if (shareSubscription == null) + if (shareSubscriptionSynchronization == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscription"); + throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionSynchronization"); } - if (shareSubscription != null) + if (shareSubscriptionSynchronization != null) { - shareSubscription.Validate(); + shareSubscriptionSynchronization.Validate(); } if (Client.ApiVersion == null) { @@ -332,13 +380,16 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareSubscriptionName", shareSubscriptionName); - tracingParameters.Add("shareSubscription", shareSubscription); + tracingParameters.Add("shareSubscriptionSynchronization", shareSubscriptionSynchronization); + tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("filter", filter); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizationDetails", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -348,6 +399,18 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -355,7 +418,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -386,9 +449,9 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; - if(shareSubscription != null) + if(shareSubscriptionSynchronization != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(shareSubscription, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(shareSubscriptionSynchronization, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } @@ -412,7 +475,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { var ex = new DataShareErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -442,7 +505,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -455,25 +518,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -493,10 +538,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// Delete shareSubscription in an account. + /// List Synchronizations in a share subscription. /// /// - /// Delete a shareSubscription in an account + /// List synchronizations of a share subscription /// /// /// The resource group name. @@ -505,35 +550,16 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// The name of the share account. /// /// - /// The name of the shareSubscription. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. + /// The name of the share subscription. /// - public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// List of available share subscriptions under an account. - /// - /// - /// List share subscriptions in an account - /// - /// - /// The resource group name. + /// + /// Continuation token /// - /// - /// The name of the share account. + /// + /// Filters the results using OData syntax. /// - /// - /// Continuation Token + /// + /// Sorts the results using OData syntax. /// /// /// Headers that will be added to request. @@ -556,7 +582,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSynchronizationsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -570,6 +596,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } + if (shareSubscriptionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionName"); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -583,16 +613,20 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareSubscriptionName", shareSubscriptionName); tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("filter", filter); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByAccount", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizations", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizations").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareSubscriptionName}", System.Uri.EscapeDataString(shareSubscriptionName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -602,6 +636,14 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -609,7 +651,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -690,7 +732,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -703,7 +745,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -723,10 +765,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// Get source share synchronization settings for a shareSubscription. + /// Initiate an asynchronous data share job /// /// - /// Get synchronization settings set on a share + /// Initiate a copy /// /// /// The resource group name. @@ -735,10 +777,38 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// The name of the share account. /// /// - /// The name of the shareSubscription. + /// The name of share subscription /// - /// - /// Continuation token + /// + /// Synchronize payload + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> SynchronizeMethodWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Synchronize synchronize, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginSynchronizeMethodWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, synchronize, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get shareSubscription in an account. + /// + /// + /// Get a shareSubscription in an account + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The name of the shareSubscription. /// /// /// Headers that will be added to request. @@ -761,7 +831,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSourceShareSynchronizationSettingsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -793,13 +863,12 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareSubscriptionName", shareSubscriptionName); - tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSourceShareSynchronizationSettings", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -809,10 +878,6 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -820,7 +885,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -901,7 +966,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -914,7 +979,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -934,10 +999,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// List Synchronizations in a share subscription. + /// Create shareSubscription in an account. /// /// - /// List synchronizations of a share subscription + /// Create a shareSubscription in an account /// /// /// The resource group name. @@ -946,10 +1011,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// The name of the share account. /// /// - /// The name of the share subscription. + /// The name of the shareSubscription. /// - /// - /// Continuation token + /// + /// create parameters for shareSubscription /// /// /// Headers that will be added to request. @@ -972,7 +1037,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSynchronizationsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscription shareSubscription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -990,6 +1055,14 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionName"); } + if (shareSubscription == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscription"); + } + if (shareSubscription != null) + { + shareSubscription.Validate(); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -1004,13 +1077,13 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareSubscriptionName", shareSubscriptionName); - tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("shareSubscription", shareSubscription); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizations", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizations").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -1020,10 +1093,6 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1031,7 +1100,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1062,6 +1131,12 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; + if(shareSubscription != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(shareSubscription, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -1082,7 +1157,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new DataShareErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1112,7 +1187,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1125,7 +1200,25 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1145,10 +1238,38 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// List data set level details for a share subscription synchronization + /// Delete shareSubscription in an account. + /// + /// + /// Delete a shareSubscription in an account + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. + /// + /// + /// The name of the shareSubscription. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// List of available share subscriptions under an account. /// /// - /// List synchronization details + /// List share subscriptions in an account /// /// /// The resource group name. @@ -1156,14 +1277,14 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// The name of the share account. /// - /// - /// The name of the share subscription. + /// + /// Continuation Token /// - /// - /// Share Subscription Synchronization payload. + /// + /// Filters the results using OData syntax. /// - /// - /// Continuation token + /// + /// Sorts the results using OData syntax. /// /// /// Headers that will be added to request. @@ -1186,7 +1307,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSynchronizationDetailsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1200,18 +1321,6 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - if (shareSubscriptionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionName"); - } - if (shareSubscriptionSynchronization == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionSynchronization"); - } - if (shareSubscriptionSynchronization != null) - { - shareSubscriptionSynchronization.Validate(); - } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -1225,19 +1334,18 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("shareSubscriptionName", shareSubscriptionName); - tracingParameters.Add("shareSubscriptionSynchronization", shareSubscriptionSynchronization); tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("filter", filter); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizationDetails", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByAccount", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); - _url = _url.Replace("{shareSubscriptionName}", System.Uri.EscapeDataString(shareSubscriptionName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -1247,6 +1355,14 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1254,7 +1370,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1285,12 +1401,6 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; - if(shareSubscriptionSynchronization != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(shareSubscriptionSynchronization, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -1341,7 +1451,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1354,7 +1464,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1373,37 +1483,6 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) return _result; } - /// - /// Initiate an asynchronous data share job - /// - /// - /// Initiate a copy - /// - /// - /// The resource group name. - /// - /// - /// The name of the share account. - /// - /// - /// The name of share subscription - /// - /// - /// Synchronize payload - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> SynchronizeMethodWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Synchronize synchronize, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginSynchronizeMethodWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, synchronize, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - /// /// Request cancellation of a data share snapshot /// @@ -1423,34 +1502,6 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// Share Subscription Synchronization payload. /// /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CancelSynchronizationWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginCancelSynchronizationWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete shareSubscription in an account. - /// - /// - /// Delete a shareSubscription in an account - /// - /// - /// The resource group name. - /// - /// - /// The name of the share account. - /// - /// - /// The name of the shareSubscription. - /// - /// /// Headers that will be added to request. /// /// @@ -1471,7 +1522,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCancelSynchronizationWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1489,6 +1540,14 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionName"); } + if (shareSubscriptionSynchronization == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionSynchronization"); + } + if (shareSubscriptionSynchronization != null) + { + shareSubscriptionSynchronization.Validate(); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -1503,12 +1562,13 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareSubscriptionName", shareSubscriptionName); + tracingParameters.Add("shareSubscriptionSynchronization", shareSubscriptionSynchronization); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCancelSynchronization", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -1525,7 +1585,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1556,6 +1616,12 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; + if(shareSubscriptionSynchronization != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(shareSubscriptionSynchronization, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -1576,7 +1642,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new DataShareErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1606,7 +1672,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1619,7 +1685,25 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1719,7 +1803,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/Synchronize").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/synchronize").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -1874,10 +1958,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// Request cancellation of a data share snapshot + /// Delete shareSubscription in an account. /// /// - /// Request to cancel a synchronization. + /// Delete a shareSubscription in an account /// /// /// The resource group name. @@ -1888,9 +1972,6 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// The name of the shareSubscription. /// - /// - /// Share Subscription Synchronization payload. - /// /// /// Headers that will be added to request. /// @@ -1912,7 +1993,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCancelSynchronizationWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1930,14 +2011,6 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionName"); } - if (shareSubscriptionSynchronization == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "shareSubscriptionSynchronization"); - } - if (shareSubscriptionSynchronization != null) - { - shareSubscriptionSynchronization.Validate(); - } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -1952,13 +2025,12 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareSubscriptionName", shareSubscriptionName); - tracingParameters.Add("shareSubscriptionSynchronization", shareSubscriptionSynchronization); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCancelSynchronization", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -1975,7 +2047,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2006,12 +2078,6 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; - if(shareSubscriptionSynchronization != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(shareSubscriptionSynchronization, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -2032,7 +2098,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new DataShareErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2062,7 +2128,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2075,25 +2141,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2113,10 +2161,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// List of available share subscriptions under an account. + /// Get source share synchronization settings for a shareSubscription. /// /// - /// List share subscriptions in an account + /// Get synchronization settings set on a share /// /// /// The NextLink from the previous successful call to List operation. @@ -2142,7 +2190,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSourceShareSynchronizationSettingsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -2157,7 +2205,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByAccountNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSourceShareSynchronizationSettingsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -2170,7 +2218,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2251,7 +2299,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2264,7 +2312,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2284,10 +2332,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// Get source share synchronization settings for a shareSubscription. + /// List data set level details for a share subscription synchronization /// /// - /// Get synchronization settings set on a share + /// List synchronization details /// /// /// The NextLink from the previous successful call to List operation. @@ -2313,7 +2361,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSourceShareSynchronizationSettingsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSynchronizationDetailsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -2328,7 +2376,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSourceShareSynchronizationSettingsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizationDetailsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -2422,7 +2470,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2435,7 +2483,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2626,10 +2674,10 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) } /// - /// List data set level details for a share subscription synchronization + /// List of available share subscriptions under an account. /// /// - /// List synchronization details + /// List share subscriptions in an account /// /// /// The NextLink from the previous successful call to List operation. @@ -2655,7 +2703,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSynchronizationDetailsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -2670,7 +2718,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizationDetailsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByAccountNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -2683,7 +2731,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2764,7 +2812,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2777,7 +2825,7 @@ internal ShareSubscriptionsOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ShareSubscriptionsOperationsExtensions.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ShareSubscriptionsOperationsExtensions.cs index d8a710c32e3e..946c94ef1f64 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ShareSubscriptionsOperationsExtensions.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/ShareSubscriptionsOperationsExtensions.cs @@ -22,10 +22,10 @@ namespace Microsoft.Azure.Management.DataShare public static partial class ShareSubscriptionsOperationsExtensions { /// - /// Get shareSubscription in an account. + /// Request cancellation of a data share snapshot /// /// - /// Get a shareSubscription in an account + /// Request to cancel a synchronization. /// /// /// The operations group for this extension method. @@ -39,16 +39,19 @@ public static partial class ShareSubscriptionsOperationsExtensions /// /// The name of the shareSubscription. /// - public static ShareSubscription Get(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName) + /// + /// Share Subscription Synchronization payload. + /// + public static ShareSubscriptionSynchronization CancelSynchronization(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization) { - return operations.GetAsync(resourceGroupName, accountName, shareSubscriptionName).GetAwaiter().GetResult(); + return operations.CancelSynchronizationAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization).GetAwaiter().GetResult(); } /// - /// Get shareSubscription in an account. + /// Request cancellation of a data share snapshot /// /// - /// Get a shareSubscription in an account + /// Request to cancel a synchronization. /// /// /// The operations group for this extension method. @@ -62,22 +65,25 @@ public static ShareSubscription Get(this IShareSubscriptionsOperations operation /// /// The name of the shareSubscription. /// + /// + /// Share Subscription Synchronization payload. + /// /// /// The cancellation token. /// - public static async Task GetAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CancelSynchronizationAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CancelSynchronizationWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Create shareSubscription in an account. + /// Get source share synchronization settings for a shareSubscription. /// /// - /// Create a shareSubscription in an account + /// Get synchronization settings set on a share /// /// /// The operations group for this extension method. @@ -91,19 +97,19 @@ public static ShareSubscription Get(this IShareSubscriptionsOperations operation /// /// The name of the shareSubscription. /// - /// - /// create parameters for shareSubscription + /// + /// Continuation token /// - public static ShareSubscription Create(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscription shareSubscription) + public static IPage ListSourceShareSynchronizationSettings(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string)) { - return operations.CreateAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscription).GetAwaiter().GetResult(); + return operations.ListSourceShareSynchronizationSettingsAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken).GetAwaiter().GetResult(); } /// - /// Create shareSubscription in an account. + /// Get source share synchronization settings for a shareSubscription. /// /// - /// Create a shareSubscription in an account + /// Get synchronization settings set on a share /// /// /// The operations group for this extension method. @@ -117,25 +123,25 @@ public static ShareSubscription Create(this IShareSubscriptionsOperations operat /// /// The name of the shareSubscription. /// - /// - /// create parameters for shareSubscription + /// + /// Continuation token /// /// /// The cancellation token. /// - public static async Task CreateAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscription shareSubscription, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSourceShareSynchronizationSettingsAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscription, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListSourceShareSynchronizationSettingsWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Delete shareSubscription in an account. + /// List data set level details for a share subscription synchronization /// /// - /// Delete a shareSubscription in an account + /// List synchronization details /// /// /// The operations group for this extension method. @@ -147,18 +153,30 @@ public static ShareSubscription Create(this IShareSubscriptionsOperations operat /// The name of the share account. /// /// - /// The name of the shareSubscription. + /// The name of the share subscription. /// - public static OperationResponse Delete(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName) + /// + /// Share Subscription Synchronization payload. + /// + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// + public static IPage ListSynchronizationDetails(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, string skipToken = default(string), string filter = default(string), string orderby = default(string)) { - return operations.DeleteAsync(resourceGroupName, accountName, shareSubscriptionName).GetAwaiter().GetResult(); + return operations.ListSynchronizationDetailsAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, skipToken, filter, orderby).GetAwaiter().GetResult(); } /// - /// Delete shareSubscription in an account. + /// List data set level details for a share subscription synchronization /// /// - /// Delete a shareSubscription in an account + /// List synchronization details /// /// /// The operations group for this extension method. @@ -170,24 +188,36 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// The name of the share account. /// /// - /// The name of the shareSubscription. + /// The name of the share subscription. + /// + /// + /// Share Subscription Synchronization payload. + /// + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSynchronizationDetailsAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListSynchronizationDetailsWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// List of available share subscriptions under an account. + /// List Synchronizations in a share subscription. /// /// - /// List share subscriptions in an account + /// List synchronizations of a share subscription /// /// /// The operations group for this extension method. @@ -198,19 +228,28 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// /// The name of the share account. /// + /// + /// The name of the share subscription. + /// /// - /// Continuation Token + /// Continuation token /// - public static IPage ListByAccount(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string skipToken = default(string)) + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// + public static IPage ListSynchronizations(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), string filter = default(string), string orderby = default(string)) { - return operations.ListByAccountAsync(resourceGroupName, accountName, skipToken).GetAwaiter().GetResult(); + return operations.ListSynchronizationsAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken, filter, orderby).GetAwaiter().GetResult(); } /// - /// List of available share subscriptions under an account. + /// List Synchronizations in a share subscription. /// /// - /// List share subscriptions in an account + /// List synchronizations of a share subscription /// /// /// The operations group for this extension method. @@ -221,25 +260,34 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// /// The name of the share account. /// + /// + /// The name of the share subscription. + /// /// - /// Continuation Token + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The cancellation token. /// - public static async Task> ListByAccountAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSynchronizationsAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListSynchronizationsWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Get source share synchronization settings for a shareSubscription. + /// Initiate an asynchronous data share job /// /// - /// Get synchronization settings set on a share + /// Initiate a copy /// /// /// The operations group for this extension method. @@ -251,21 +299,21 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// The name of the share account. /// /// - /// The name of the shareSubscription. + /// The name of share subscription /// - /// - /// Continuation token + /// + /// Synchronize payload /// - public static IPage ListSourceShareSynchronizationSettings(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string)) + public static ShareSubscriptionSynchronization SynchronizeMethod(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, Synchronize synchronize) { - return operations.ListSourceShareSynchronizationSettingsAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken).GetAwaiter().GetResult(); + return operations.SynchronizeMethodAsync(resourceGroupName, accountName, shareSubscriptionName, synchronize).GetAwaiter().GetResult(); } /// - /// Get source share synchronization settings for a shareSubscription. + /// Initiate an asynchronous data share job /// /// - /// Get synchronization settings set on a share + /// Initiate a copy /// /// /// The operations group for this extension method. @@ -277,27 +325,27 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// The name of the share account. /// /// - /// The name of the shareSubscription. + /// The name of share subscription /// - /// - /// Continuation token + /// + /// Synchronize payload /// /// /// The cancellation token. /// - public static async Task> ListSourceShareSynchronizationSettingsAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task SynchronizeMethodAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, Synchronize synchronize, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListSourceShareSynchronizationSettingsWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.SynchronizeMethodWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, synchronize, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// List Synchronizations in a share subscription. + /// Get shareSubscription in an account. /// /// - /// List synchronizations of a share subscription + /// Get a shareSubscription in an account /// /// /// The operations group for this extension method. @@ -309,21 +357,18 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// The name of the share account. /// /// - /// The name of the share subscription. - /// - /// - /// Continuation token + /// The name of the shareSubscription. /// - public static IPage ListSynchronizations(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string)) + public static ShareSubscription Get(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName) { - return operations.ListSynchronizationsAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, accountName, shareSubscriptionName).GetAwaiter().GetResult(); } /// - /// List Synchronizations in a share subscription. + /// Get shareSubscription in an account. /// /// - /// List synchronizations of a share subscription + /// Get a shareSubscription in an account /// /// /// The operations group for this extension method. @@ -335,27 +380,24 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// The name of the share account. /// /// - /// The name of the share subscription. - /// - /// - /// Continuation token + /// The name of the shareSubscription. /// /// /// The cancellation token. /// - public static async Task> ListSynchronizationsAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListSynchronizationsWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// List data set level details for a share subscription synchronization + /// Create shareSubscription in an account. /// /// - /// List synchronization details + /// Create a shareSubscription in an account /// /// /// The operations group for this extension method. @@ -367,24 +409,21 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// The name of the share account. /// /// - /// The name of the share subscription. - /// - /// - /// Share Subscription Synchronization payload. + /// The name of the shareSubscription. /// - /// - /// Continuation token + /// + /// create parameters for shareSubscription /// - public static IPage ListSynchronizationDetails(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, string skipToken = default(string)) + public static ShareSubscription Create(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscription shareSubscription) { - return operations.ListSynchronizationDetailsAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, skipToken).GetAwaiter().GetResult(); + return operations.CreateAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscription).GetAwaiter().GetResult(); } /// - /// List data set level details for a share subscription synchronization + /// Create shareSubscription in an account. /// /// - /// List synchronization details + /// Create a shareSubscription in an account /// /// /// The operations group for this extension method. @@ -396,30 +435,27 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// The name of the share account. /// /// - /// The name of the share subscription. - /// - /// - /// Share Subscription Synchronization payload. + /// The name of the shareSubscription. /// - /// - /// Continuation token + /// + /// create parameters for shareSubscription /// /// /// The cancellation token. /// - public static async Task> ListSynchronizationDetailsAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscription shareSubscription, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListSynchronizationDetailsWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscription, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Initiate an asynchronous data share job + /// Delete shareSubscription in an account. /// /// - /// Initiate a copy + /// Delete a shareSubscription in an account /// /// /// The operations group for this extension method. @@ -431,21 +467,18 @@ public static OperationResponse Delete(this IShareSubscriptionsOperations operat /// The name of the share account. /// /// - /// The name of share subscription - /// - /// - /// Synchronize payload + /// The name of the shareSubscription. /// - public static ShareSubscriptionSynchronization SynchronizeMethod(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, Synchronize synchronize) + public static OperationResponse Delete(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName) { - return operations.SynchronizeMethodAsync(resourceGroupName, accountName, shareSubscriptionName, synchronize).GetAwaiter().GetResult(); + return operations.DeleteAsync(resourceGroupName, accountName, shareSubscriptionName).GetAwaiter().GetResult(); } /// - /// Initiate an asynchronous data share job + /// Delete shareSubscription in an account. /// /// - /// Initiate a copy + /// Delete a shareSubscription in an account /// /// /// The operations group for this extension method. @@ -457,27 +490,24 @@ public static ShareSubscriptionSynchronization SynchronizeMethod(this IShareSubs /// The name of the share account. /// /// - /// The name of share subscription - /// - /// - /// Synchronize payload + /// The name of the shareSubscription. /// /// /// The cancellation token. /// - public static async Task SynchronizeMethodAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, Synchronize synchronize, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.SynchronizeMethodWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, synchronize, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Request cancellation of a data share snapshot + /// List of available share subscriptions under an account. /// /// - /// Request to cancel a synchronization. + /// List share subscriptions in an account /// /// /// The operations group for this extension method. @@ -488,22 +518,25 @@ public static ShareSubscriptionSynchronization SynchronizeMethod(this IShareSubs /// /// The name of the share account. /// - /// - /// The name of the shareSubscription. + /// + /// Continuation Token /// - /// - /// Share Subscription Synchronization payload. + /// + /// Filters the results using OData syntax. /// - public static ShareSubscriptionSynchronization CancelSynchronization(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization) + /// + /// Sorts the results using OData syntax. + /// + public static IPage ListByAccount(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string)) { - return operations.CancelSynchronizationAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization).GetAwaiter().GetResult(); + return operations.ListByAccountAsync(resourceGroupName, accountName, skipToken, filter, orderby).GetAwaiter().GetResult(); } /// - /// Request cancellation of a data share snapshot + /// List of available share subscriptions under an account. /// /// - /// Request to cancel a synchronization. + /// List share subscriptions in an account /// /// /// The operations group for this extension method. @@ -514,28 +547,31 @@ public static ShareSubscriptionSynchronization CancelSynchronization(this IShare /// /// The name of the share account. /// - /// - /// The name of the shareSubscription. + /// + /// Continuation Token /// - /// - /// Share Subscription Synchronization payload. + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The cancellation token. /// - public static async Task CancelSynchronizationAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByAccountAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CancelSynchronizationWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Delete shareSubscription in an account. + /// Request cancellation of a data share snapshot /// /// - /// Delete a shareSubscription in an account + /// Request to cancel a synchronization. /// /// /// The operations group for this extension method. @@ -549,16 +585,19 @@ public static ShareSubscriptionSynchronization CancelSynchronization(this IShare /// /// The name of the shareSubscription. /// - public static OperationResponse BeginDelete(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName) + /// + /// Share Subscription Synchronization payload. + /// + public static ShareSubscriptionSynchronization BeginCancelSynchronization(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization) { - return operations.BeginDeleteAsync(resourceGroupName, accountName, shareSubscriptionName).GetAwaiter().GetResult(); + return operations.BeginCancelSynchronizationAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization).GetAwaiter().GetResult(); } /// - /// Delete shareSubscription in an account. + /// Request cancellation of a data share snapshot /// /// - /// Delete a shareSubscription in an account + /// Request to cancel a synchronization. /// /// /// The operations group for this extension method. @@ -572,12 +611,15 @@ public static OperationResponse BeginDelete(this IShareSubscriptionsOperations o /// /// The name of the shareSubscription. /// + /// + /// Share Subscription Synchronization payload. + /// /// /// The cancellation token. /// - public static async Task BeginDeleteAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginCancelSynchronizationAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginCancelSynchronizationWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -642,10 +684,10 @@ public static ShareSubscriptionSynchronization BeginSynchronizeMethod(this IShar } /// - /// Request cancellation of a data share snapshot + /// Delete shareSubscription in an account. /// /// - /// Request to cancel a synchronization. + /// Delete a shareSubscription in an account /// /// /// The operations group for this extension method. @@ -659,19 +701,16 @@ public static ShareSubscriptionSynchronization BeginSynchronizeMethod(this IShar /// /// The name of the shareSubscription. /// - /// - /// Share Subscription Synchronization payload. - /// - public static ShareSubscriptionSynchronization BeginCancelSynchronization(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization) + public static OperationResponse BeginDelete(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName) { - return operations.BeginCancelSynchronizationAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization).GetAwaiter().GetResult(); + return operations.BeginDeleteAsync(resourceGroupName, accountName, shareSubscriptionName).GetAwaiter().GetResult(); } /// - /// Request cancellation of a data share snapshot + /// Delete shareSubscription in an account. /// /// - /// Request to cancel a synchronization. + /// Delete a shareSubscription in an account /// /// /// The operations group for this extension method. @@ -685,25 +724,22 @@ public static ShareSubscriptionSynchronization BeginCancelSynchronization(this I /// /// The name of the shareSubscription. /// - /// - /// Share Subscription Synchronization payload. - /// /// /// The cancellation token. /// - public static async Task BeginCancelSynchronizationAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, ShareSubscriptionSynchronization shareSubscriptionSynchronization, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginDeleteAsync(this IShareSubscriptionsOperations operations, string resourceGroupName, string accountName, string shareSubscriptionName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.BeginCancelSynchronizationWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, shareSubscriptionSynchronization, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareSubscriptionName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// List of available share subscriptions under an account. + /// Get source share synchronization settings for a shareSubscription. /// /// - /// List share subscriptions in an account + /// Get synchronization settings set on a share /// /// /// The operations group for this extension method. @@ -711,16 +747,16 @@ public static ShareSubscriptionSynchronization BeginCancelSynchronization(this I /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListByAccountNext(this IShareSubscriptionsOperations operations, string nextPageLink) + public static IPage ListSourceShareSynchronizationSettingsNext(this IShareSubscriptionsOperations operations, string nextPageLink) { - return operations.ListByAccountNextAsync(nextPageLink).GetAwaiter().GetResult(); + return operations.ListSourceShareSynchronizationSettingsNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// List of available share subscriptions under an account. + /// Get source share synchronization settings for a shareSubscription. /// /// - /// List share subscriptions in an account + /// Get synchronization settings set on a share /// /// /// The operations group for this extension method. @@ -731,19 +767,19 @@ public static IPage ListByAccountNext(this IShareSubscription /// /// The cancellation token. /// - public static async Task> ListByAccountNextAsync(this IShareSubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSourceShareSynchronizationSettingsNextAsync(this IShareSubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListSourceShareSynchronizationSettingsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Get source share synchronization settings for a shareSubscription. + /// List data set level details for a share subscription synchronization /// /// - /// Get synchronization settings set on a share + /// List synchronization details /// /// /// The operations group for this extension method. @@ -751,16 +787,16 @@ public static IPage ListByAccountNext(this IShareSubscription /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListSourceShareSynchronizationSettingsNext(this IShareSubscriptionsOperations operations, string nextPageLink) + public static IPage ListSynchronizationDetailsNext(this IShareSubscriptionsOperations operations, string nextPageLink) { - return operations.ListSourceShareSynchronizationSettingsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return operations.ListSynchronizationDetailsNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// Get source share synchronization settings for a shareSubscription. + /// List data set level details for a share subscription synchronization /// /// - /// Get synchronization settings set on a share + /// List synchronization details /// /// /// The operations group for this extension method. @@ -771,9 +807,9 @@ public static IPage ListSourceShareSynchroniz /// /// The cancellation token. /// - public static async Task> ListSourceShareSynchronizationSettingsNextAsync(this IShareSubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSynchronizationDetailsNextAsync(this IShareSubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListSourceShareSynchronizationSettingsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListSynchronizationDetailsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -820,10 +856,10 @@ public static IPage ListSynchronizationsNext(t } /// - /// List data set level details for a share subscription synchronization + /// List of available share subscriptions under an account. /// /// - /// List synchronization details + /// List share subscriptions in an account /// /// /// The operations group for this extension method. @@ -831,16 +867,16 @@ public static IPage ListSynchronizationsNext(t /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListSynchronizationDetailsNext(this IShareSubscriptionsOperations operations, string nextPageLink) + public static IPage ListByAccountNext(this IShareSubscriptionsOperations operations, string nextPageLink) { - return operations.ListSynchronizationDetailsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return operations.ListByAccountNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// List data set level details for a share subscription synchronization + /// List of available share subscriptions under an account. /// /// - /// List synchronization details + /// List share subscriptions in an account /// /// /// The operations group for this extension method. @@ -851,9 +887,9 @@ public static IPage ListSynchronizationDetailsNext(this /// /// The cancellation token. /// - public static async Task> ListSynchronizationDetailsNextAsync(this IShareSubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByAccountNextAsync(this IShareSubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListSynchronizationDetailsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SharesOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SharesOperations.cs index 8253d02d5396..caf5cd91797a 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SharesOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SharesOperations.cs @@ -51,10 +51,10 @@ internal SharesOperations(DataShareManagementClient client) public DataShareManagementClient Client { get; private set; } /// - /// Get a specified share + /// List data set level details for a share synchronization /// /// - /// Get a share + /// List synchronization details /// /// /// The resource group name. @@ -63,7 +63,19 @@ internal SharesOperations(DataShareManagementClient client) /// The name of the share account. /// /// - /// The name of the share to retrieve. + /// The name of the share. + /// + /// + /// Share Synchronization payload. + /// + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// Headers that will be added to request. @@ -86,7 +98,7 @@ internal SharesOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSynchronizationDetailsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -104,6 +116,10 @@ internal SharesOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); } + if (shareSynchronization == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareSynchronization"); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -118,12 +134,16 @@ internal SharesOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareName", shareName); + tracingParameters.Add("shareSynchronization", shareSynchronization); + tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("filter", filter); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizationDetails", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizationDetails").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -133,6 +153,18 @@ internal SharesOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -140,7 +172,7 @@ internal SharesOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -171,6 +203,12 @@ internal SharesOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; + if(shareSynchronization != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(shareSynchronization, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -221,7 +259,7 @@ internal SharesOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -234,7 +272,7 @@ internal SharesOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -254,10 +292,10 @@ internal SharesOperations(DataShareManagementClient client) } /// - /// Create a share in the given account. + /// List Synchronizations in a share /// /// - /// Create a share + /// List synchronizations of a share /// /// /// The resource group name. @@ -268,8 +306,14 @@ internal SharesOperations(DataShareManagementClient client) /// /// The name of the share. /// - /// - /// The share payload + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// Headers that will be added to request. @@ -292,7 +336,7 @@ internal SharesOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Share share, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSynchronizationsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -310,10 +354,6 @@ internal SharesOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); } - if (share == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "share"); - } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -328,13 +368,15 @@ internal SharesOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareName", shareName); - tracingParameters.Add("share", share); + tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("filter", filter); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizations", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizations").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -344,6 +386,18 @@ internal SharesOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -351,7 +405,7 @@ internal SharesOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -382,12 +436,6 @@ internal SharesOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; - if(share != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(share, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -408,7 +456,7 @@ internal SharesOperations(DataShareManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { var ex = new DataShareErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -438,7 +486,7 @@ internal SharesOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -451,25 +499,7 @@ internal SharesOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -489,10 +519,10 @@ internal SharesOperations(DataShareManagementClient client) } /// - /// Deletes a share + /// Get a specified share /// /// - /// Delete a share + /// Get a share /// /// /// The resource group name. @@ -501,35 +531,7 @@ internal SharesOperations(DataShareManagementClient client) /// The name of the share account. /// /// - /// The name of the share. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// List of available shares under an account. - /// - /// - /// List shares in an account - /// - /// - /// The resource group name. - /// - /// - /// The name of the share account. - /// - /// - /// Continuation Token + /// The name of the share to retrieve. /// /// /// Headers that will be added to request. @@ -552,7 +554,7 @@ internal SharesOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -566,6 +568,10 @@ internal SharesOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -579,25 +585,22 @@ internal SharesOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("shareName", shareName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByAccount", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -686,7 +689,7 @@ internal SharesOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -699,7 +702,7 @@ internal SharesOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -719,10 +722,10 @@ internal SharesOperations(DataShareManagementClient client) } /// - /// List Synchronizations in a share + /// Create a share in the given account. /// /// - /// List synchronizations of a share + /// Create a share /// /// /// The resource group name. @@ -733,8 +736,8 @@ internal SharesOperations(DataShareManagementClient client) /// /// The name of the share. /// - /// - /// Continuation token + /// + /// The share payload /// /// /// Headers that will be added to request. @@ -757,7 +760,7 @@ internal SharesOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSynchronizationsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Share share, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -775,6 +778,10 @@ internal SharesOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); } + if (share == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "share"); + } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -789,13 +796,13 @@ internal SharesOperations(DataShareManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("shareName", shareName); - tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("share", share); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizations", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizations").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); @@ -805,10 +812,6 @@ internal SharesOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } - if (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -816,7 +819,7 @@ internal SharesOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -847,6 +850,12 @@ internal SharesOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; + if(share != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(share, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -867,7 +876,7 @@ internal SharesOperations(DataShareManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new DataShareErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -897,7 +906,7 @@ internal SharesOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -910,7 +919,25 @@ internal SharesOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -930,10 +957,10 @@ internal SharesOperations(DataShareManagementClient client) } /// - /// List data set level details for a share synchronization + /// Deletes a share /// /// - /// List synchronization details + /// Delete a share /// /// /// The resource group name. @@ -944,11 +971,39 @@ internal SharesOperations(DataShareManagementClient client) /// /// The name of the share. /// - /// - /// Share Synchronization payload. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// List of available shares under an account. + /// + /// + /// List shares in an account + /// + /// + /// The resource group name. + /// + /// + /// The name of the share account. /// /// - /// Continuation token + /// Continuation Token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// Headers that will be added to request. @@ -971,7 +1026,7 @@ internal SharesOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSynchronizationDetailsWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByAccountWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -985,14 +1040,6 @@ internal SharesOperations(DataShareManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - if (shareName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); - } - if (shareSynchronization == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "shareSynchronization"); - } if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); @@ -1006,19 +1053,18 @@ internal SharesOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("shareName", shareName); - tracingParameters.Add("shareSynchronization", shareSynchronization); tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("filter", filter); + tracingParameters.Add("orderby", orderby); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizationDetails", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByAccount", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizationDetails").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); - _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -1028,6 +1074,14 @@ internal SharesOperations(DataShareManagementClient client) { _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1035,7 +1089,7 @@ internal SharesOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1066,12 +1120,6 @@ internal SharesOperations(DataShareManagementClient client) // Serialize Request string _requestContent = null; - if(shareSynchronization != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(shareSynchronization, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -1122,7 +1170,7 @@ internal SharesOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1135,7 +1183,7 @@ internal SharesOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1358,10 +1406,10 @@ internal SharesOperations(DataShareManagementClient client) } /// - /// List of available shares under an account. + /// List data set level details for a share synchronization /// /// - /// List shares in an account + /// List synchronization details /// /// /// The NextLink from the previous successful call to List operation. @@ -1387,7 +1435,7 @@ internal SharesOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListSynchronizationDetailsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1402,7 +1450,7 @@ internal SharesOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByAccountNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizationDetailsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -1415,7 +1463,7 @@ internal SharesOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1496,7 +1544,7 @@ internal SharesOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1509,7 +1557,7 @@ internal SharesOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1700,10 +1748,10 @@ internal SharesOperations(DataShareManagementClient client) } /// - /// List data set level details for a share synchronization + /// List of available shares under an account. /// /// - /// List synchronization details + /// List shares in an account /// /// /// The NextLink from the previous successful call to List operation. @@ -1729,7 +1777,7 @@ internal SharesOperations(DataShareManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListSynchronizationDetailsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByAccountNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1744,7 +1792,7 @@ internal SharesOperations(DataShareManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSynchronizationDetailsNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByAccountNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -1757,7 +1805,7 @@ internal SharesOperations(DataShareManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1838,7 +1886,7 @@ internal SharesOperations(DataShareManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1851,7 +1899,7 @@ internal SharesOperations(DataShareManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SharesOperationsExtensions.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SharesOperationsExtensions.cs index 190c573091d4..f82691ed6837 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SharesOperationsExtensions.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SharesOperationsExtensions.cs @@ -22,10 +22,10 @@ namespace Microsoft.Azure.Management.DataShare public static partial class SharesOperationsExtensions { /// - /// Get a specified share + /// List data set level details for a share synchronization /// /// - /// Get a share + /// List synchronization details /// /// /// The operations group for this extension method. @@ -37,18 +37,30 @@ public static partial class SharesOperationsExtensions /// The name of the share account. /// /// - /// The name of the share to retrieve. + /// The name of the share. /// - public static Share Get(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName) + /// + /// Share Synchronization payload. + /// + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// + public static IPage ListSynchronizationDetails(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string), string filter = default(string), string orderby = default(string)) { - return operations.GetAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult(); + return operations.ListSynchronizationDetailsAsync(resourceGroupName, accountName, shareName, shareSynchronization, skipToken, filter, orderby).GetAwaiter().GetResult(); } /// - /// Get a specified share + /// List data set level details for a share synchronization /// /// - /// Get a share + /// List synchronization details /// /// /// The operations group for this extension method. @@ -60,24 +72,36 @@ public static Share Get(this ISharesOperations operations, string resourceGroupN /// The name of the share account. /// /// - /// The name of the share to retrieve. + /// The name of the share. + /// + /// + /// Share Synchronization payload. + /// + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The cancellation token. /// - public static async Task GetAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSynchronizationDetailsAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListSynchronizationDetailsWithHttpMessagesAsync(resourceGroupName, accountName, shareName, shareSynchronization, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Create a share in the given account. + /// List Synchronizations in a share /// /// - /// Create a share + /// List synchronizations of a share /// /// /// The operations group for this extension method. @@ -91,19 +115,25 @@ public static Share Get(this ISharesOperations operations, string resourceGroupN /// /// The name of the share. /// - /// - /// The share payload + /// + /// Continuation token /// - public static Share Create(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, Share share) + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. + /// + public static IPage ListSynchronizations(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string)) { - return operations.CreateAsync(resourceGroupName, accountName, shareName, share).GetAwaiter().GetResult(); + return operations.ListSynchronizationsAsync(resourceGroupName, accountName, shareName, skipToken, filter, orderby).GetAwaiter().GetResult(); } /// - /// Create a share in the given account. + /// List Synchronizations in a share /// /// - /// Create a share + /// List synchronizations of a share /// /// /// The operations group for this extension method. @@ -117,25 +147,31 @@ public static Share Create(this ISharesOperations operations, string resourceGro /// /// The name of the share. /// - /// - /// The share payload + /// + /// Continuation token + /// + /// + /// Filters the results using OData syntax. + /// + /// + /// Sorts the results using OData syntax. /// /// /// The cancellation token. /// - public static async Task CreateAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, Share share, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSynchronizationsAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, share, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListSynchronizationsWithHttpMessagesAsync(resourceGroupName, accountName, shareName, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Deletes a share + /// Get a specified share /// /// - /// Delete a share + /// Get a share /// /// /// The operations group for this extension method. @@ -147,18 +183,18 @@ public static Share Create(this ISharesOperations operations, string resourceGro /// The name of the share account. /// /// - /// The name of the share. + /// The name of the share to retrieve. /// - public static OperationResponse Delete(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName) + public static Share Get(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName) { - return operations.DeleteAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult(); } /// - /// Deletes a share + /// Get a specified share /// /// - /// Delete a share + /// Get a share /// /// /// The operations group for this extension method. @@ -170,24 +206,24 @@ public static OperationResponse Delete(this ISharesOperations operations, string /// The name of the share account. /// /// - /// The name of the share. + /// The name of the share to retrieve. /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// List of available shares under an account. + /// Create a share in the given account. /// /// - /// List shares in an account + /// Create a share /// /// /// The operations group for this extension method. @@ -198,19 +234,22 @@ public static OperationResponse Delete(this ISharesOperations operations, string /// /// The name of the share account. /// - /// - /// Continuation Token + /// + /// The name of the share. /// - public static IPage ListByAccount(this ISharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string)) + /// + /// The share payload + /// + public static Share Create(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, Share share) { - return operations.ListByAccountAsync(resourceGroupName, accountName, skipToken).GetAwaiter().GetResult(); + return operations.CreateAsync(resourceGroupName, accountName, shareName, share).GetAwaiter().GetResult(); } /// - /// List of available shares under an account. + /// Create a share in the given account. /// /// - /// List shares in an account + /// Create a share /// /// /// The operations group for this extension method. @@ -221,25 +260,28 @@ public static OperationResponse Delete(this ISharesOperations operations, string /// /// The name of the share account. /// - /// - /// Continuation Token + /// + /// The name of the share. + /// + /// + /// The share payload /// /// /// The cancellation token. /// - public static async Task> ListByAccountAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, Share share, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, share, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// List Synchronizations in a share + /// Deletes a share /// /// - /// List synchronizations of a share + /// Delete a share /// /// /// The operations group for this extension method. @@ -253,19 +295,16 @@ public static OperationResponse Delete(this ISharesOperations operations, string /// /// The name of the share. /// - /// - /// Continuation token - /// - public static IPage ListSynchronizations(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string)) + public static OperationResponse Delete(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName) { - return operations.ListSynchronizationsAsync(resourceGroupName, accountName, shareName, skipToken).GetAwaiter().GetResult(); + return operations.DeleteAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult(); } /// - /// List Synchronizations in a share + /// Deletes a share /// /// - /// List synchronizations of a share + /// Delete a share /// /// /// The operations group for this extension method. @@ -279,25 +318,22 @@ public static OperationResponse Delete(this ISharesOperations operations, string /// /// The name of the share. /// - /// - /// Continuation token - /// /// /// The cancellation token. /// - public static async Task> ListSynchronizationsAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListSynchronizationsWithHttpMessagesAsync(resourceGroupName, accountName, shareName, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// List data set level details for a share synchronization + /// List of available shares under an account. /// /// - /// List synchronization details + /// List shares in an account /// /// /// The operations group for this extension method. @@ -308,25 +344,25 @@ public static OperationResponse Delete(this ISharesOperations operations, string /// /// The name of the share account. /// - /// - /// The name of the share. + /// + /// Continuation Token /// - /// - /// Share Synchronization payload. + /// + /// Filters the results using OData syntax. /// - /// - /// Continuation token + /// + /// Sorts the results using OData syntax. /// - public static IPage ListSynchronizationDetails(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string)) + public static IPage ListByAccount(this ISharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string)) { - return operations.ListSynchronizationDetailsAsync(resourceGroupName, accountName, shareName, shareSynchronization, skipToken).GetAwaiter().GetResult(); + return operations.ListByAccountAsync(resourceGroupName, accountName, skipToken, filter, orderby).GetAwaiter().GetResult(); } /// - /// List data set level details for a share synchronization + /// List of available shares under an account. /// /// - /// List synchronization details + /// List shares in an account /// /// /// The operations group for this extension method. @@ -337,21 +373,21 @@ public static OperationResponse Delete(this ISharesOperations operations, string /// /// The name of the share account. /// - /// - /// The name of the share. + /// + /// Continuation Token /// - /// - /// Share Synchronization payload. + /// + /// Filters the results using OData syntax. /// - /// - /// Continuation token + /// + /// Sorts the results using OData syntax. /// /// /// The cancellation token. /// - public static async Task> ListSynchronizationDetailsAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string shareName, ShareSynchronization shareSynchronization, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByAccountAsync(this ISharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string filter = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListSynchronizationDetailsWithHttpMessagesAsync(resourceGroupName, accountName, shareName, shareSynchronization, skipToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, skipToken, filter, orderby, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -410,10 +446,10 @@ public static OperationResponse BeginDelete(this ISharesOperations operations, s } /// - /// List of available shares under an account. + /// List data set level details for a share synchronization /// /// - /// List shares in an account + /// List synchronization details /// /// /// The operations group for this extension method. @@ -421,16 +457,16 @@ public static OperationResponse BeginDelete(this ISharesOperations operations, s /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListByAccountNext(this ISharesOperations operations, string nextPageLink) + public static IPage ListSynchronizationDetailsNext(this ISharesOperations operations, string nextPageLink) { - return operations.ListByAccountNextAsync(nextPageLink).GetAwaiter().GetResult(); + return operations.ListSynchronizationDetailsNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// List of available shares under an account. + /// List data set level details for a share synchronization /// /// - /// List shares in an account + /// List synchronization details /// /// /// The operations group for this extension method. @@ -441,9 +477,9 @@ public static IPage ListByAccountNext(this ISharesOperations operations, /// /// The cancellation token. /// - public static async Task> ListByAccountNextAsync(this ISharesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListSynchronizationDetailsNextAsync(this ISharesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListByAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListSynchronizationDetailsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -490,10 +526,10 @@ public static IPage ListSynchronizationsNext(this ISharesO } /// - /// List data set level details for a share synchronization + /// List of available shares under an account. /// /// - /// List synchronization details + /// List shares in an account /// /// /// The operations group for this extension method. @@ -501,16 +537,16 @@ public static IPage ListSynchronizationsNext(this ISharesO /// /// The NextLink from the previous successful call to List operation. /// - public static IPage ListSynchronizationDetailsNext(this ISharesOperations operations, string nextPageLink) + public static IPage ListByAccountNext(this ISharesOperations operations, string nextPageLink) { - return operations.ListSynchronizationDetailsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return operations.ListByAccountNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// List data set level details for a share synchronization + /// List of available shares under an account. /// /// - /// List synchronization details + /// List shares in an account /// /// /// The operations group for this extension method. @@ -521,9 +557,9 @@ public static IPage ListSynchronizationDetailsNext(this /// /// The cancellation token. /// - public static async Task> ListSynchronizationDetailsNextAsync(this ISharesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByAccountNextAsync(this ISharesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListSynchronizationDetailsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SynchronizationSettingsOperations.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SynchronizationSettingsOperations.cs index c00bc626f5ef..bb1bdf199850 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SynchronizationSettingsOperations.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SynchronizationSettingsOperations.cs @@ -266,7 +266,7 @@ internal SynchronizationSettingsOperations(DataShareManagementClient client) /// Adds a new synchronization setting to an existing share. /// /// - /// Create or update a synchronizationSetting + /// Create a synchronizationSetting /// /// /// The resource group name. diff --git a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SynchronizationSettingsOperationsExtensions.cs b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SynchronizationSettingsOperationsExtensions.cs index 6c4f387b308b..fd58017c98e1 100644 --- a/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SynchronizationSettingsOperationsExtensions.cs +++ b/sdk/datashare/Microsoft.Azure.Management.DataShare/src/Generated/SynchronizationSettingsOperationsExtensions.cs @@ -83,7 +83,7 @@ public static SynchronizationSetting Get(this ISynchronizationSettingsOperations /// Adds a new synchronization setting to an existing share. /// /// - /// Create or update a synchronizationSetting + /// Create a synchronizationSetting /// /// /// The operations group for this extension method. @@ -112,7 +112,7 @@ public static SynchronizationSetting Create(this ISynchronizationSettingsOperati /// Adds a new synchronization setting to an existing share. /// /// - /// Create or update a synchronizationSetting + /// Create a synchronizationSetting /// /// /// The operations group for this extension method.