diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IManagedServicesClient.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IManagedServicesClient.cs index 380ada5ccf25c..66bc869afb40c 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IManagedServicesClient.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IManagedServicesClient.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ManagedServices using Newtonsoft.Json; /// - /// Specification for ManagedServices. + /// The specification for ManagedServices. /// public partial interface IManagedServicesClient : System.IDisposable { @@ -74,6 +74,16 @@ public partial interface IManagedServicesClient : System.IDisposable /// IRegistrationAssignmentsOperations RegistrationAssignments { get; } + /// + /// Gets the IMarketplaceRegistrationDefinitionsOperations. + /// + IMarketplaceRegistrationDefinitionsOperations MarketplaceRegistrationDefinitions { get; } + + /// + /// Gets the IMarketplaceRegistrationDefinitionsWithoutScopeOperations. + /// + IMarketplaceRegistrationDefinitionsWithoutScopeOperations MarketplaceRegistrationDefinitionsWithoutScope { get; } + /// /// Gets the IOperations. /// diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IMarketplaceRegistrationDefinitionsOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IMarketplaceRegistrationDefinitionsOperations.cs new file mode 100644 index 0000000000000..251bc22da73ad --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IMarketplaceRegistrationDefinitionsOperations.cs @@ -0,0 +1,106 @@ +// +// 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.ManagedServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// MarketplaceRegistrationDefinitionsOperations operations. + /// + public partial interface IMarketplaceRegistrationDefinitionsOperations + { + /// + /// Gets a list of the marketplace registration definitions for the + /// marketplace identifier. + /// + /// + /// The scope of the resource. + /// + /// + /// The filter query parameter to filter marketplace registration + /// definitions by plan identifier, publisher, version etc. + /// + /// + /// 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>> ListWithHttpMessagesAsync(string scope, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the marketplace registration definition for the marketplace + /// identifier. + /// + /// + /// The scope of the resource. + /// + /// + /// The Azure Marketplace identifier. Expected formats: + /// {publisher}.{product[-preview]}.{planName}.{version} or + /// {publisher}.{product[-preview]}.{planName} or + /// {publisher}.{product[-preview]} or {publisher}). + /// + /// + /// 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> GetWithHttpMessagesAsync(string scope, string marketplaceIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of the marketplace registration definitions for the + /// marketplace identifier. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IMarketplaceRegistrationDefinitionsWithoutScopeOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IMarketplaceRegistrationDefinitionsWithoutScopeOperations.cs new file mode 100644 index 0000000000000..303645aca8248 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IMarketplaceRegistrationDefinitionsWithoutScopeOperations.cs @@ -0,0 +1,100 @@ +// +// 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.ManagedServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// MarketplaceRegistrationDefinitionsWithoutScopeOperations operations. + /// + public partial interface IMarketplaceRegistrationDefinitionsWithoutScopeOperations + { + /// + /// Gets a list of the marketplace registration definitions for the + /// marketplace identifier. + /// + /// + /// The filter query parameter to filter marketplace registration + /// definitions by plan identifier, publisher, version etc. + /// + /// + /// 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>> ListWithHttpMessagesAsync(string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the marketplace registration definition for the marketplace + /// identifier. + /// + /// + /// The Azure Marketplace identifier. Expected formats: + /// {publisher}.{product[-preview]}.{planName}.{version} or + /// {publisher}.{product[-preview]}.{planName} or + /// {publisher}.{product[-preview]} or {publisher}). + /// + /// + /// 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> GetWithHttpMessagesAsync(string marketplaceIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of the marketplace registration definitions for the + /// marketplace identifier. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IRegistrationAssignmentsOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IRegistrationAssignmentsOperations.cs index d66d95e022c81..fad99924dea5b 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IRegistrationAssignmentsOperations.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IRegistrationAssignmentsOperations.cs @@ -24,17 +24,17 @@ namespace Microsoft.Azure.Management.ManagedServices public partial interface IRegistrationAssignmentsOperations { /// - /// Gets the details of specified registration assignment. + /// Gets the details of the specified registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// - /// Tells whether to return registration definition details also along - /// with registration assignment details. + /// The flag indicating whether to return the registration definition + /// details along with the registration assignment details. /// /// /// The headers that will be added to request. @@ -56,10 +56,10 @@ public partial interface IRegistrationAssignmentsOperations /// Deletes the specified registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The headers that will be added to request. @@ -78,10 +78,10 @@ public partial interface IRegistrationAssignmentsOperations /// Creates or updates a registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The parameters required to create new registration assignment. @@ -106,11 +106,11 @@ public partial interface IRegistrationAssignmentsOperations /// Gets a list of the registration assignments. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Tells whether to return registration definition details also along - /// with registration assignment details. + /// The flag indicating whether to return the registration definition + /// details along with the registration assignment details. /// /// /// The headers that will be added to request. @@ -132,10 +132,10 @@ public partial interface IRegistrationAssignmentsOperations /// Deletes the specified registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The headers that will be added to request. @@ -154,10 +154,10 @@ public partial interface IRegistrationAssignmentsOperations /// Creates or updates a registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The parameters required to create new registration assignment. diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IRegistrationDefinitionsOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IRegistrationDefinitionsOperations.cs index 0de04d987e3ba..b62c8585bece5 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IRegistrationDefinitionsOperations.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/IRegistrationDefinitionsOperations.cs @@ -27,10 +27,10 @@ public partial interface IRegistrationDefinitionsOperations /// Gets the registration definition details. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// /// The headers that will be added to request. @@ -52,10 +52,10 @@ public partial interface IRegistrationDefinitionsOperations /// Deletes the registration definition. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// /// The headers that will be added to request. @@ -74,13 +74,13 @@ public partial interface IRegistrationDefinitionsOperations /// Creates or updates a registration definition. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// The parameters required to create new registration definition. + /// The parameters required to create a new registration definition. /// /// /// The headers that will be added to request. @@ -102,7 +102,7 @@ public partial interface IRegistrationDefinitionsOperations /// Gets a list of the registration definitions. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// /// The headers that will be added to request. @@ -124,13 +124,13 @@ public partial interface IRegistrationDefinitionsOperations /// Creates or updates a registration definition. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// The parameters required to create new registration definition. + /// The parameters required to create a new registration definition. /// /// /// The headers that will be added to request. diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/ManagedServicesClient.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/ManagedServicesClient.cs index 445c497cfb758..f7b2fd57ddeb1 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/ManagedServicesClient.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/ManagedServicesClient.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.ManagedServices using System.Net.Http; /// - /// Specification for ManagedServices. + /// The specification for ManagedServices. /// public partial class ManagedServicesClient : ServiceClient, IManagedServicesClient, IAzureClient { @@ -79,6 +79,16 @@ public partial class ManagedServicesClient : ServiceClient public virtual IRegistrationAssignmentsOperations RegistrationAssignments { get; private set; } + /// + /// Gets the IMarketplaceRegistrationDefinitionsOperations. + /// + public virtual IMarketplaceRegistrationDefinitionsOperations MarketplaceRegistrationDefinitions { get; private set; } + + /// + /// Gets the IMarketplaceRegistrationDefinitionsWithoutScopeOperations. + /// + public virtual IMarketplaceRegistrationDefinitionsWithoutScopeOperations MarketplaceRegistrationDefinitionsWithoutScope { get; private set; } + /// /// Gets the IOperations. /// @@ -327,9 +337,11 @@ private void Initialize() { RegistrationDefinitions = new RegistrationDefinitionsOperations(this); RegistrationAssignments = new RegistrationAssignmentsOperations(this); + MarketplaceRegistrationDefinitions = new MarketplaceRegistrationDefinitionsOperations(this); + MarketplaceRegistrationDefinitionsWithoutScope = new MarketplaceRegistrationDefinitionsWithoutScopeOperations(this); Operations = new Operations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2019-06-01"; + ApiVersion = "2020-02-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperations.cs new file mode 100644 index 0000000000000..cb5b9c4b3b113 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperations.cs @@ -0,0 +1,599 @@ +// +// 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.ManagedServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// MarketplaceRegistrationDefinitionsOperations operations. + /// + internal partial class MarketplaceRegistrationDefinitionsOperations : IServiceOperations, IMarketplaceRegistrationDefinitionsOperations + { + /// + /// Initializes a new instance of the MarketplaceRegistrationDefinitionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal MarketplaceRegistrationDefinitionsOperations(ManagedServicesClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ManagedServicesClient + /// + public ManagedServicesClient Client { get; private set; } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The scope of the resource. + /// + /// + /// The filter query parameter to filter marketplace registration definitions + /// by plan identifier, publisher, version etc. + /// + /// + /// 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>> ListWithHttpMessagesAsync(string scope, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + 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("scope", scope); + tracingParameters.Add("filter", filter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions").ToString(); + _url = _url.Replace("{scope}", scope); + List _queryParameters = new List(); + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Get the marketplace registration definition for the marketplace identifier. + /// + /// + /// The scope of the resource. + /// + /// + /// The Azure Marketplace identifier. Expected formats: + /// {publisher}.{product[-preview]}.{planName}.{version} or + /// {publisher}.{product[-preview]}.{planName} or + /// {publisher}.{product[-preview]} or {publisher}). + /// + /// + /// 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> GetWithHttpMessagesAsync(string scope, string marketplaceIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "scope"); + } + if (marketplaceIdentifier == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "marketplaceIdentifier"); + } + 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("scope", scope); + tracingParameters.Add("marketplaceIdentifier", marketplaceIdentifier); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/{marketplaceIdentifier}").ToString(); + _url = _url.Replace("{scope}", scope); + _url = _url.Replace("{marketplaceIdentifier}", System.Uri.EscapeDataString(marketplaceIdentifier)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperationsExtensions.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperationsExtensions.cs new file mode 100644 index 0000000000000..fc91fd54ca476 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsOperationsExtensions.cs @@ -0,0 +1,151 @@ +// +// 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.ManagedServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for MarketplaceRegistrationDefinitionsOperations. + /// + public static partial class MarketplaceRegistrationDefinitionsOperationsExtensions + { + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The scope of the resource. + /// + /// + /// The filter query parameter to filter marketplace registration definitions + /// by plan identifier, publisher, version etc. + /// + public static IPage List(this IMarketplaceRegistrationDefinitionsOperations operations, string scope, string filter = default(string)) + { + return operations.ListAsync(scope, filter).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The scope of the resource. + /// + /// + /// The filter query parameter to filter marketplace registration definitions + /// by plan identifier, publisher, version etc. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IMarketplaceRegistrationDefinitionsOperations operations, string scope, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(scope, filter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the marketplace registration definition for the marketplace identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The scope of the resource. + /// + /// + /// The Azure Marketplace identifier. Expected formats: + /// {publisher}.{product[-preview]}.{planName}.{version} or + /// {publisher}.{product[-preview]}.{planName} or + /// {publisher}.{product[-preview]} or {publisher}). + /// + public static MarketplaceRegistrationDefinition Get(this IMarketplaceRegistrationDefinitionsOperations operations, string scope, string marketplaceIdentifier) + { + return operations.GetAsync(scope, marketplaceIdentifier).GetAwaiter().GetResult(); + } + + /// + /// Get the marketplace registration definition for the marketplace identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The scope of the resource. + /// + /// + /// The Azure Marketplace identifier. Expected formats: + /// {publisher}.{product[-preview]}.{planName}.{version} or + /// {publisher}.{product[-preview]}.{planName} or + /// {publisher}.{product[-preview]} or {publisher}). + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IMarketplaceRegistrationDefinitionsOperations operations, string scope, string marketplaceIdentifier, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(scope, marketplaceIdentifier, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IMarketplaceRegistrationDefinitionsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IMarketplaceRegistrationDefinitionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsWithoutScopeOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsWithoutScopeOperations.cs new file mode 100644 index 0000000000000..51cf353676e02 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsWithoutScopeOperations.cs @@ -0,0 +1,581 @@ +// +// 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.ManagedServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// MarketplaceRegistrationDefinitionsWithoutScopeOperations operations. + /// + internal partial class MarketplaceRegistrationDefinitionsWithoutScopeOperations : IServiceOperations, IMarketplaceRegistrationDefinitionsWithoutScopeOperations + { + /// + /// Initializes a new instance of the MarketplaceRegistrationDefinitionsWithoutScopeOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal MarketplaceRegistrationDefinitionsWithoutScopeOperations(ManagedServicesClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ManagedServicesClient + /// + public ManagedServicesClient Client { get; private set; } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The filter query parameter to filter marketplace registration definitions + /// by plan identifier, publisher, version etc. + /// + /// + /// 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>> ListWithHttpMessagesAsync(string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + 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("filter", filter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions").ToString(); + List _queryParameters = new List(); + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Get the marketplace registration definition for the marketplace identifier. + /// + /// + /// The Azure Marketplace identifier. Expected formats: + /// {publisher}.{product[-preview]}.{planName}.{version} or + /// {publisher}.{product[-preview]}.{planName} or + /// {publisher}.{product[-preview]} or {publisher}). + /// + /// + /// 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> GetWithHttpMessagesAsync(string marketplaceIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (marketplaceIdentifier == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "marketplaceIdentifier"); + } + 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("marketplaceIdentifier", marketplaceIdentifier); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/{marketplaceIdentifier}").ToString(); + _url = _url.Replace("{marketplaceIdentifier}", System.Uri.EscapeDataString(marketplaceIdentifier)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsWithoutScopeOperationsExtensions.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsWithoutScopeOperationsExtensions.cs new file mode 100644 index 0000000000000..958930412300e --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/MarketplaceRegistrationDefinitionsWithoutScopeOperationsExtensions.cs @@ -0,0 +1,139 @@ +// +// 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.ManagedServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for MarketplaceRegistrationDefinitionsWithoutScopeOperations. + /// + public static partial class MarketplaceRegistrationDefinitionsWithoutScopeOperationsExtensions + { + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The filter query parameter to filter marketplace registration definitions + /// by plan identifier, publisher, version etc. + /// + public static IPage List(this IMarketplaceRegistrationDefinitionsWithoutScopeOperations operations, string filter = default(string)) + { + return operations.ListAsync(filter).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The filter query parameter to filter marketplace registration definitions + /// by plan identifier, publisher, version etc. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IMarketplaceRegistrationDefinitionsWithoutScopeOperations operations, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(filter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the marketplace registration definition for the marketplace identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The Azure Marketplace identifier. Expected formats: + /// {publisher}.{product[-preview]}.{planName}.{version} or + /// {publisher}.{product[-preview]}.{planName} or + /// {publisher}.{product[-preview]} or {publisher}). + /// + public static MarketplaceRegistrationDefinition Get(this IMarketplaceRegistrationDefinitionsWithoutScopeOperations operations, string marketplaceIdentifier) + { + return operations.GetAsync(marketplaceIdentifier).GetAwaiter().GetResult(); + } + + /// + /// Get the marketplace registration definition for the marketplace identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The Azure Marketplace identifier. Expected formats: + /// {publisher}.{product[-preview]}.{planName}.{version} or + /// {publisher}.{product[-preview]}.{planName} or + /// {publisher}.{product[-preview]} or {publisher}). + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IMarketplaceRegistrationDefinitionsWithoutScopeOperations operations, string marketplaceIdentifier, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(marketplaceIdentifier, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IMarketplaceRegistrationDefinitionsWithoutScopeOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of the marketplace registration definitions for the marketplace + /// identifier. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IMarketplaceRegistrationDefinitionsWithoutScopeOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Authorization.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Authorization.cs index 6a4a0996b8ae3..98eaeb01093e8 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Authorization.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Authorization.cs @@ -12,11 +12,14 @@ namespace Microsoft.Azure.Management.ManagedServices.Models { using Microsoft.Rest; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// - /// Authorization tuple containing principal Id (of user/service - /// principal/security group) and role definition id. + /// The Azure Active Directory principal identifier and Azure built-in role + /// that describes the access the principal will receive on the delegated + /// resource in the managed tenant. /// public partial class Authorization { @@ -31,17 +34,25 @@ public Authorization() /// /// Initializes a new instance of the Authorization class. /// - /// Principal Id of the security - /// group/service principal/user that would be assigned permissions to - /// the projected subscription - /// The role definition identifier. This - /// role will define all the permissions that the security - /// group/service principal/user must have on the projected - /// subscription. This role cannot be an owner role. - public Authorization(string principalId, string roleDefinitionId) + /// The identifier of the Azure Active + /// Directory principal. + /// The identifier of the Azure built-in + /// role that defines the permissions that the Azure Active Directory + /// principal will have on the projected scope. + /// The display name of the Azure + /// Active Directory principal. + /// The + /// delegatedRoleDefinitionIds field is required when the + /// roleDefinitionId refers to the User Access Administrator Role. It + /// is the list of role definition ids which define all the permissions + /// that the user in the authorization can assign to other + /// principals. + public Authorization(string principalId, string roleDefinitionId, string principalIdDisplayName = default(string), IList delegatedRoleDefinitionIds = default(IList)) { PrincipalId = principalId; + PrincipalIdDisplayName = principalIdDisplayName; RoleDefinitionId = roleDefinitionId; + DelegatedRoleDefinitionIds = delegatedRoleDefinitionIds; CustomInit(); } @@ -51,22 +62,37 @@ public Authorization(string principalId, string roleDefinitionId) partial void CustomInit(); /// - /// Gets or sets principal Id of the security group/service - /// principal/user that would be assigned permissions to the projected - /// subscription + /// Gets or sets the identifier of the Azure Active Directory + /// principal. /// [JsonProperty(PropertyName = "principalId")] public string PrincipalId { get; set; } /// - /// Gets or sets the role definition identifier. This role will define - /// all the permissions that the security group/service principal/user - /// must have on the projected subscription. This role cannot be an - /// owner role. + /// Gets or sets the display name of the Azure Active Directory + /// principal. + /// + [JsonProperty(PropertyName = "principalIdDisplayName")] + public string PrincipalIdDisplayName { get; set; } + + /// + /// Gets or sets the identifier of the Azure built-in role that defines + /// the permissions that the Azure Active Directory principal will have + /// on the projected scope. /// [JsonProperty(PropertyName = "roleDefinitionId")] public string RoleDefinitionId { get; set; } + /// + /// Gets or sets the delegatedRoleDefinitionIds field is required when + /// the roleDefinitionId refers to the User Access Administrator Role. + /// It is the list of role definition ids which define all the + /// permissions that the user in the authorization can assign to other + /// principals. + /// + [JsonProperty(PropertyName = "delegatedRoleDefinitionIds")] + public IList DelegatedRoleDefinitionIds { get; set; } + /// /// Validate the object. /// diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/EligibleApprover.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/EligibleApprover.cs new file mode 100644 index 0000000000000..8f85086826ed7 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/EligibleApprover.cs @@ -0,0 +1,79 @@ +// +// 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.ManagedServices.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the Azure Active Directory principal that can approve any + /// just-in-time access requests by the principal defined in the + /// EligibleAuthorization. + /// + public partial class EligibleApprover + { + /// + /// Initializes a new instance of the EligibleApprover class. + /// + public EligibleApprover() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EligibleApprover class. + /// + /// The identifier of the Azure Active + /// Directory principal. + /// The display name of the Azure + /// Active Directory principal. + public EligibleApprover(string principalId, string principalIdDisplayName = default(string)) + { + PrincipalId = principalId; + PrincipalIdDisplayName = principalIdDisplayName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identifier of the Azure Active Directory + /// principal. + /// + [JsonProperty(PropertyName = "principalId")] + public string PrincipalId { get; set; } + + /// + /// Gets or sets the display name of the Azure Active Directory + /// principal. + /// + [JsonProperty(PropertyName = "principalIdDisplayName")] + public string PrincipalIdDisplayName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PrincipalId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PrincipalId"); + } + } + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/EligibleAuthorization.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/EligibleAuthorization.cs new file mode 100644 index 0000000000000..fad0b87f215a9 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/EligibleAuthorization.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.ManagedServices.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Azure Active Directory principal identifier, Azure built-in role, + /// and just-in-time access policy that describes the just-in-time access + /// the principal will receive on the delegated resource in the managed + /// tenant. + /// + public partial class EligibleAuthorization + { + /// + /// Initializes a new instance of the EligibleAuthorization class. + /// + public EligibleAuthorization() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EligibleAuthorization class. + /// + /// The identifier of the Azure Active + /// Directory principal. + /// The identifier of the Azure built-in + /// role that defines the permissions that the Azure Active Directory + /// principal will have on the projected scope. + /// The display name of the Azure + /// Active Directory principal. + /// The just-in-time access policy + /// setting. + public EligibleAuthorization(string principalId, string roleDefinitionId, string principalIdDisplayName = default(string), JustInTimeAccessPolicy justInTimeAccessPolicy = default(JustInTimeAccessPolicy)) + { + PrincipalId = principalId; + PrincipalIdDisplayName = principalIdDisplayName; + RoleDefinitionId = roleDefinitionId; + JustInTimeAccessPolicy = justInTimeAccessPolicy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identifier of the Azure Active Directory + /// principal. + /// + [JsonProperty(PropertyName = "principalId")] + public string PrincipalId { get; set; } + + /// + /// Gets or sets the display name of the Azure Active Directory + /// principal. + /// + [JsonProperty(PropertyName = "principalIdDisplayName")] + public string PrincipalIdDisplayName { get; set; } + + /// + /// Gets or sets the identifier of the Azure built-in role that defines + /// the permissions that the Azure Active Directory principal will have + /// on the projected scope. + /// + [JsonProperty(PropertyName = "roleDefinitionId")] + public string RoleDefinitionId { get; set; } + + /// + /// Gets or sets the just-in-time access policy setting. + /// + [JsonProperty(PropertyName = "justInTimeAccessPolicy")] + public JustInTimeAccessPolicy JustInTimeAccessPolicy { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PrincipalId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PrincipalId"); + } + if (RoleDefinitionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RoleDefinitionId"); + } + if (JustInTimeAccessPolicy != null) + { + JustInTimeAccessPolicy.Validate(); + } + } + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponseError.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorDefinition.cs similarity index 56% rename from sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponseError.cs rename to sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorDefinition.cs index 20d4f22452a57..7cdd5815c127e 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponseError.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorDefinition.cs @@ -12,32 +12,36 @@ namespace Microsoft.Azure.Management.ManagedServices.Models { using Microsoft.Rest; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// - /// Error response indicates Azure Resource Manager is not able to process - /// the incoming request. The reason is provided in the error message. + /// The error response indicating why the incoming request wasn’t able to + /// be processed /// - public partial class ErrorResponseError + public partial class ErrorDefinition { /// - /// Initializes a new instance of the ErrorResponseError class. + /// Initializes a new instance of the ErrorDefinition class. /// - public ErrorResponseError() + public ErrorDefinition() { CustomInit(); } /// - /// Initializes a new instance of the ErrorResponseError class. + /// Initializes a new instance of the ErrorDefinition class. /// - /// Error code. - /// Error message indicating why the operation - /// failed. - public ErrorResponseError(string code, string message) + /// The error code. + /// The error message indicating why the + /// operation failed. + /// The internal error details. + public ErrorDefinition(string code, string message, IList details = default(IList)) { Code = code; Message = message; + Details = details; CustomInit(); } @@ -47,17 +51,23 @@ public ErrorResponseError(string code, string message) partial void CustomInit(); /// - /// Gets or sets error code. + /// Gets or sets the error code. /// [JsonProperty(PropertyName = "code")] public string Code { get; set; } /// - /// Gets or sets error message indicating why the operation failed. + /// Gets or sets the error message indicating why the operation failed. /// [JsonProperty(PropertyName = "message")] public string Message { get; set; } + /// + /// Gets or sets the internal error details. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; set; } + /// /// Validate the object. /// @@ -74,6 +84,16 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Message"); } + if (Details != null) + { + foreach (var element in Details) + { + if (element != null) + { + element.Validate(); + } + } + } } } } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponse.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponse.cs index 4941a69f09d1a..5b2ed0613df8d 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponse.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/ErrorResponse.cs @@ -29,10 +29,8 @@ public ErrorResponse() /// /// Initializes a new instance of the ErrorResponse class. /// - /// Error response indicates Azure Resource Manager - /// is not able to process the incoming request. The reason is provided - /// in the error message. - public ErrorResponse(ErrorResponseError error = default(ErrorResponseError)) + /// The error details. + public ErrorResponse(ErrorDefinition error = default(ErrorDefinition)) { Error = error; CustomInit(); @@ -44,12 +42,10 @@ public ErrorResponse() partial void CustomInit(); /// - /// Gets error response indicates Azure Resource Manager is not able to - /// process the incoming request. The reason is provided in the error - /// message. + /// Gets or sets the error details. /// [JsonProperty(PropertyName = "error")] - public ErrorResponseError Error { get; private set; } + public ErrorDefinition Error { get; set; } /// /// Validate the object. diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/JustInTimeAccessPolicy.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/JustInTimeAccessPolicy.cs new file mode 100644 index 0000000000000..00832d038b162 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/JustInTimeAccessPolicy.cs @@ -0,0 +1,101 @@ +// +// 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.ManagedServices.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Just-in-time access policy setting. + /// + public partial class JustInTimeAccessPolicy + { + /// + /// Initializes a new instance of the JustInTimeAccessPolicy class. + /// + public JustInTimeAccessPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JustInTimeAccessPolicy class. + /// + /// The multi-factor + /// authorization provider to be used for just-in-time access requests. + /// Possible values include: 'Azure', 'None' + /// The maximum access duration + /// in ISO 8601 format for just-in-time access requests. + /// The list of managedByTenant + /// approvers for the eligible authorization. + public JustInTimeAccessPolicy(string multiFactorAuthProvider, System.TimeSpan? maximumActivationDuration = default(System.TimeSpan?), IList managedByTenantApprovers = default(IList)) + { + MultiFactorAuthProvider = multiFactorAuthProvider; + MaximumActivationDuration = maximumActivationDuration; + ManagedByTenantApprovers = managedByTenantApprovers; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the multi-factor authorization provider to be used for + /// just-in-time access requests. Possible values include: 'Azure', + /// 'None' + /// + [JsonProperty(PropertyName = "multiFactorAuthProvider")] + public string MultiFactorAuthProvider { get; set; } + + /// + /// Gets or sets the maximum access duration in ISO 8601 format for + /// just-in-time access requests. + /// + [JsonProperty(PropertyName = "maximumActivationDuration")] + public System.TimeSpan? MaximumActivationDuration { get; set; } + + /// + /// Gets or sets the list of managedByTenant approvers for the eligible + /// authorization. + /// + [JsonProperty(PropertyName = "managedByTenantApprovers")] + public IList ManagedByTenantApprovers { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (MultiFactorAuthProvider == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MultiFactorAuthProvider"); + } + if (ManagedByTenantApprovers != null) + { + foreach (var element in ManagedByTenantApprovers) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinition.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinition.cs new file mode 100644 index 0000000000000..ccd44aa502227 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinition.cs @@ -0,0 +1,110 @@ +// +// 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.ManagedServices.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + public partial class MarketplaceRegistrationDefinition : IResource + { + /// + /// Initializes a new instance of the MarketplaceRegistrationDefinition + /// class. + /// + public MarketplaceRegistrationDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MarketplaceRegistrationDefinition + /// class. + /// + /// The properties of the marketplace + /// registration definition. + /// The details for the Managed Services offer’s + /// plan in Azure Marketplace. + /// The fully qualified path of the marketplace + /// registration definition. + /// The type of the Azure resource + /// (Microsoft.ManagedServices/marketplaceRegistrationDefinitions). + /// The name of the marketplace registration + /// definition. + public MarketplaceRegistrationDefinition(MarketplaceRegistrationDefinitionProperties properties = default(MarketplaceRegistrationDefinitionProperties), Plan plan = default(Plan), string id = default(string), string type = default(string), string name = default(string)) + { + Properties = properties; + Plan = plan; + Id = id; + Type = type; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the properties of the marketplace registration + /// definition. + /// + [JsonProperty(PropertyName = "properties")] + public MarketplaceRegistrationDefinitionProperties Properties { get; set; } + + /// + /// Gets or sets the details for the Managed Services offer’s plan in + /// Azure Marketplace. + /// + [JsonProperty(PropertyName = "plan")] + public Plan Plan { get; set; } + + /// + /// Gets the fully qualified path of the marketplace registration + /// definition. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the type of the Azure resource + /// (Microsoft.ManagedServices/marketplaceRegistrationDefinitions). + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the name of the marketplace registration definition. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties != null) + { + Properties.Validate(); + } + if (Plan != null) + { + Plan.Validate(); + } + } + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinitionProperties.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinitionProperties.cs new file mode 100644 index 0000000000000..dd1dc6f560493 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MarketplaceRegistrationDefinitionProperties.cs @@ -0,0 +1,148 @@ +// +// 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.ManagedServices.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The properties of the marketplace registration definition. + /// + public partial class MarketplaceRegistrationDefinitionProperties + { + /// + /// Initializes a new instance of the + /// MarketplaceRegistrationDefinitionProperties class. + /// + public MarketplaceRegistrationDefinitionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// MarketplaceRegistrationDefinitionProperties class. + /// + /// The identifier of the managedBy + /// tenant. + /// The collection of authorization + /// objects describing the access Azure Active Directory principals in + /// the managedBy tenant will receive on the delegated resource in the + /// managed tenant. + /// The collection of eligible + /// authorization objects describing the just-in-time access Azure + /// Active Directory principals in the managedBy tenant will receive on + /// the delegated resource in the managed tenant. + /// The marketplace offer display + /// name. + /// The marketplace publisher + /// display name. + /// The marketplace plan display + /// name. + public MarketplaceRegistrationDefinitionProperties(string managedByTenantId, IList authorizations, IList eligibleAuthorizations = default(IList), string offerDisplayName = default(string), string publisherDisplayName = default(string), string planDisplayName = default(string)) + { + ManagedByTenantId = managedByTenantId; + Authorizations = authorizations; + EligibleAuthorizations = eligibleAuthorizations; + OfferDisplayName = offerDisplayName; + PublisherDisplayName = publisherDisplayName; + PlanDisplayName = planDisplayName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identifier of the managedBy tenant. + /// + [JsonProperty(PropertyName = "managedByTenantId")] + public string ManagedByTenantId { get; set; } + + /// + /// Gets or sets the collection of authorization objects describing the + /// access Azure Active Directory principals in the managedBy tenant + /// will receive on the delegated resource in the managed tenant. + /// + [JsonProperty(PropertyName = "authorizations")] + public IList Authorizations { get; set; } + + /// + /// Gets or sets the collection of eligible authorization objects + /// describing the just-in-time access Azure Active Directory + /// principals in the managedBy tenant will receive on the delegated + /// resource in the managed tenant. + /// + [JsonProperty(PropertyName = "eligibleAuthorizations")] + public IList EligibleAuthorizations { get; set; } + + /// + /// Gets or sets the marketplace offer display name. + /// + [JsonProperty(PropertyName = "offerDisplayName")] + public string OfferDisplayName { get; set; } + + /// + /// Gets or sets the marketplace publisher display name. + /// + [JsonProperty(PropertyName = "publisherDisplayName")] + public string PublisherDisplayName { get; set; } + + /// + /// Gets or sets the marketplace plan display name. + /// + [JsonProperty(PropertyName = "planDisplayName")] + public string PlanDisplayName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ManagedByTenantId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ManagedByTenantId"); + } + if (Authorizations == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Authorizations"); + } + if (Authorizations != null) + { + foreach (var element in Authorizations) + { + if (element != null) + { + element.Validate(); + } + } + } + if (EligibleAuthorizations != null) + { + foreach (var element1 in EligibleAuthorizations) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MultiFactorAuthProvider.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MultiFactorAuthProvider.cs new file mode 100644 index 0000000000000..91fa6af73fcc9 --- /dev/null +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/MultiFactorAuthProvider.cs @@ -0,0 +1,22 @@ +// +// 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.ManagedServices.Models +{ + + /// + /// Defines values for MultiFactorAuthProvider. + /// + public static class MultiFactorAuthProvider + { + public const string Azure = "Azure"; + public const string None = "None"; + } +} diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Operation.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Operation.cs index 1f62df997d5e1..a4e79f5389848 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Operation.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Operation.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.ManagedServices.Models using System.Linq; /// - /// Object that describes a single Microsoft.ManagedServices operation. + /// The object that describes a single Microsoft.ManagedServices operation. /// public partial class Operation { @@ -29,7 +29,7 @@ public Operation() /// /// Initializes a new instance of the Operation class. /// - /// Operation name: + /// The operation name with the format: /// {provider}/{resource}/{operation} /// The object that represents the /// operation. @@ -46,7 +46,8 @@ public Operation() partial void CustomInit(); /// - /// Gets operation name: {provider}/{resource}/{operation} + /// Gets the operation name with the format: + /// {provider}/{resource}/{operation} /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/OperationDisplay.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/OperationDisplay.cs index da44aa4b456a1..c47b419bf022c 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/OperationDisplay.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/OperationDisplay.cs @@ -29,14 +29,11 @@ public OperationDisplay() /// /// Initializes a new instance of the OperationDisplay class. /// - /// Service provider: - /// Microsoft.ManagedServices - /// Resource on which the operation is - /// performed: Registration definition, registration assignment - /// etc. - /// Operation type: Read, write, delete, - /// etc. - /// Description of the operation. + /// The service provider. + /// The resource on which the operation is + /// performed. + /// The operation type. + /// The description of the operation. public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) { Provider = provider; @@ -52,26 +49,25 @@ public OperationDisplay() partial void CustomInit(); /// - /// Gets or sets service provider: Microsoft.ManagedServices + /// Gets or sets the service provider. /// [JsonProperty(PropertyName = "provider")] public string Provider { get; set; } /// - /// Gets or sets resource on which the operation is performed: - /// Registration definition, registration assignment etc. + /// Gets or sets the resource on which the operation is performed. /// [JsonProperty(PropertyName = "resource")] public string Resource { get; set; } /// - /// Gets or sets operation type: Read, write, delete, etc. + /// Gets or sets the operation type. /// [JsonProperty(PropertyName = "operation")] public string Operation { get; set; } /// - /// Gets or sets description of the operation. + /// Gets or sets the description of the operation. /// [JsonProperty(PropertyName = "description")] public string Description { get; set; } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/OperationList.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/OperationList.cs index 673c674030741..d11055dd595d7 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/OperationList.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/OperationList.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ManagedServices.Models using System.Linq; /// - /// List of the operations. + /// The list of the operations. /// public partial class OperationList { @@ -31,7 +31,7 @@ public OperationList() /// /// Initializes a new instance of the OperationList class. /// - /// List of Microsoft.ManagedServices + /// The list of Microsoft.ManagedServices /// operations. public OperationList(IList value = default(IList)) { @@ -45,7 +45,7 @@ public OperationList() partial void CustomInit(); /// - /// Gets list of Microsoft.ManagedServices operations. + /// Gets the list of Microsoft.ManagedServices operations. /// [JsonProperty(PropertyName = "value")] public IList Value { get; private set; } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Plan.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Plan.cs index 6aa7a53d9d76b..0d5c80279ca2e 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Plan.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/Plan.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.ManagedServices.Models using System.Linq; /// - /// Plan details for the managed services. + /// The details for the Managed Services offer’s plan in Azure Marketplace. /// public partial class Plan { @@ -30,10 +30,10 @@ public Plan() /// /// Initializes a new instance of the Plan class. /// - /// The plan name. - /// The publisher ID. - /// The product code. - /// The plan's version. + /// Azure Marketplace plan name. + /// Azure Marketplace publisher ID. + /// Azure Marketplace product code. + /// Azure Marketplace plan's version. public Plan(string name, string publisher, string product, string version) { Name = name; @@ -49,25 +49,25 @@ public Plan(string name, string publisher, string product, string version) partial void CustomInit(); /// - /// Gets or sets the plan name. + /// Gets or sets azure Marketplace plan name. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// - /// Gets or sets the publisher ID. + /// Gets or sets azure Marketplace publisher ID. /// [JsonProperty(PropertyName = "publisher")] public string Publisher { get; set; } /// - /// Gets or sets the product code. + /// Gets or sets azure Marketplace product code. /// [JsonProperty(PropertyName = "product")] public string Product { get; set; } /// - /// Gets or sets the plan's version. + /// Gets or sets azure Marketplace plan's version. /// [JsonProperty(PropertyName = "version")] public string Version { get; set; } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignment.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignment.cs index 15e2b97a7d09c..a1e01dbab551e 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignment.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignment.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ManagedServices.Models using System.Linq; /// - /// Registration assignment. + /// The registration assignment. /// public partial class RegistrationAssignment : IResource { @@ -31,12 +31,13 @@ public RegistrationAssignment() /// /// Initializes a new instance of the RegistrationAssignment class. /// - /// Properties of a registration + /// The properties of a registration /// assignment. /// The fully qualified path of the registration /// assignment. - /// Type of the resource. - /// Name of the registration assignment. + /// The type of the Azure resource + /// (Microsoft.ManagedServices/registrationAssignments). + /// The name of the registration assignment. public RegistrationAssignment(RegistrationAssignmentProperties properties = default(RegistrationAssignmentProperties), string id = default(string), string type = default(string), string name = default(string)) { Properties = properties; @@ -52,7 +53,7 @@ public RegistrationAssignment() partial void CustomInit(); /// - /// Gets or sets properties of a registration assignment. + /// Gets or sets the properties of a registration assignment. /// [JsonProperty(PropertyName = "properties")] public RegistrationAssignmentProperties Properties { get; set; } @@ -64,13 +65,14 @@ public RegistrationAssignment() public string Id { get; private set; } /// - /// Gets type of the resource. + /// Gets the type of the Azure resource + /// (Microsoft.ManagedServices/registrationAssignments). /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } /// - /// Gets name of the registration assignment. + /// Gets the name of the registration assignment. /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentProperties.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentProperties.cs index d28de874becfd..bce1ef9a04346 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentProperties.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentProperties.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.ManagedServices.Models using System.Linq; /// - /// Properties of a registration assignment. + /// The properties of the registration assignment. /// public partial class RegistrationAssignmentProperties { @@ -32,14 +32,15 @@ public RegistrationAssignmentProperties() /// Initializes a new instance of the RegistrationAssignmentProperties /// class. /// - /// Fully qualified path of the - /// registration definition. - /// Current state of the registration - /// assignment. Possible values include: 'NotSpecified', 'Accepted', - /// 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', - /// 'Canceled', 'Failed', 'Succeeded', 'Updating' - /// Registration definition inside - /// registration assignment. + /// The fully qualified path of + /// the registration definition. + /// The current provisioning state of + /// the registration assignment. Possible values include: + /// 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + /// 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + /// 'Succeeded', 'Updating' + /// The registration definition + /// associated with the registration assignment. public RegistrationAssignmentProperties(string registrationDefinitionId, string provisioningState = default(string), RegistrationAssignmentPropertiesRegistrationDefinition registrationDefinition = default(RegistrationAssignmentPropertiesRegistrationDefinition)) { RegistrationDefinitionId = registrationDefinitionId; @@ -54,22 +55,24 @@ public RegistrationAssignmentProperties() partial void CustomInit(); /// - /// Gets or sets fully qualified path of the registration definition. + /// Gets or sets the fully qualified path of the registration + /// definition. /// [JsonProperty(PropertyName = "registrationDefinitionId")] public string RegistrationDefinitionId { get; set; } /// - /// Gets current state of the registration assignment. Possible values - /// include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - /// 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - /// 'Succeeded', 'Updating' + /// Gets the current provisioning state of the registration assignment. + /// Possible values include: 'NotSpecified', 'Accepted', 'Running', + /// 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', + /// 'Failed', 'Succeeded', 'Updating' /// [JsonProperty(PropertyName = "provisioningState")] public string ProvisioningState { get; private set; } /// - /// Gets registration definition inside registration assignment. + /// Gets the registration definition associated with the registration + /// assignment. /// [JsonProperty(PropertyName = "registrationDefinition")] public RegistrationAssignmentPropertiesRegistrationDefinition RegistrationDefinition { get; private set; } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinition.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinition.cs index bc623b23b10b0..3005872a50b06 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinition.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinition.cs @@ -14,7 +14,8 @@ namespace Microsoft.Azure.Management.ManagedServices.Models using System.Linq; /// - /// Registration definition inside registration assignment. + /// The registration definition associated with the registration + /// assignment. /// public partial class RegistrationAssignmentPropertiesRegistrationDefinition { @@ -31,14 +32,15 @@ public RegistrationAssignmentPropertiesRegistrationDefinition() /// Initializes a new instance of the /// RegistrationAssignmentPropertiesRegistrationDefinition class. /// - /// Properties of registration definition - /// inside registration assignment. - /// Plan details for the managed services. - /// Fully qualified path of the registration + /// The properties of the registration + /// definition associated with the registration assignment. + /// The details for the Managed Services offer’s + /// plan in Azure Marketplace. + /// The fully qualified path of the registration /// definition. - /// Type of the resource + /// The type of the Azure resource /// (Microsoft.ManagedServices/registrationDefinitions). - /// Name of the registration definition. + /// The name of the registration definition. public RegistrationAssignmentPropertiesRegistrationDefinition(RegistrationAssignmentPropertiesRegistrationDefinitionProperties properties = default(RegistrationAssignmentPropertiesRegistrationDefinitionProperties), Plan plan = default(Plan), string id = default(string), string type = default(string), string name = default(string)) { Properties = properties; @@ -55,33 +57,34 @@ public RegistrationAssignmentPropertiesRegistrationDefinition() partial void CustomInit(); /// - /// Gets or sets properties of registration definition inside - /// registration assignment. + /// Gets or sets the properties of the registration definition + /// associated with the registration assignment. /// [JsonProperty(PropertyName = "properties")] public RegistrationAssignmentPropertiesRegistrationDefinitionProperties Properties { get; set; } /// - /// Gets or sets plan details for the managed services. + /// Gets or sets the details for the Managed Services offer’s plan in + /// Azure Marketplace. /// [JsonProperty(PropertyName = "plan")] public Plan Plan { get; set; } /// - /// Gets fully qualified path of the registration definition. + /// Gets the fully qualified path of the registration definition. /// [JsonProperty(PropertyName = "id")] public string Id { get; private set; } /// - /// Gets type of the resource + /// Gets the type of the Azure resource /// (Microsoft.ManagedServices/registrationDefinitions). /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } /// - /// Gets name of the registration definition. + /// Gets the name of the registration definition. /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinitionProperties.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinitionProperties.cs index 29aff9ba4c0c1..d77f5cbb8143e 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinitionProperties.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationAssignmentPropertiesRegistrationDefinitionProperties.cs @@ -16,7 +16,8 @@ namespace Microsoft.Azure.Management.ManagedServices.Models using System.Linq; /// - /// Properties of registration definition inside registration assignment. + /// The properties of the registration definition associated with the + /// registration assignment. /// public partial class RegistrationAssignmentPropertiesRegistrationDefinitionProperties { @@ -35,26 +36,36 @@ public RegistrationAssignmentPropertiesRegistrationDefinitionProperties() /// RegistrationAssignmentPropertiesRegistrationDefinitionProperties /// class. /// - /// Description of the registration + /// The description of the registration /// definition. - /// Authorization tuple containing - /// principal id of the user/security group or service principal and id - /// of the build-in role. - /// Name of the registration - /// definition. - /// Current state of the registration - /// definition. Possible values include: 'NotSpecified', 'Accepted', - /// 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', - /// 'Canceled', 'Failed', 'Succeeded', 'Updating' - /// Id of the home tenant. - /// Name of the home tenant. - /// Id of the managedBy tenant. - /// Name of the managedBy + /// The collection of authorization + /// objects describing the access Azure Active Directory principals in + /// the managedBy tenant will receive on the delegated resource in the + /// managed tenant. + /// The collection of eligible + /// authorization objects describing the just-in-time access Azure + /// Active Directory principals in the managedBy tenant will receive on + /// the delegated resource in the managed tenant. + /// The name of the + /// registration definition. + /// The current provisioning state of + /// the registration definition. Possible values include: + /// 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + /// 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + /// 'Succeeded', 'Updating' + /// The identifier of the managed + /// tenant. + /// The name of the managed + /// tenant. + /// The identifier of the managedBy + /// tenant. + /// The name of the managedBy /// tenant. - public RegistrationAssignmentPropertiesRegistrationDefinitionProperties(string description = default(string), IList authorizations = default(IList), string registrationDefinitionName = default(string), string provisioningState = default(string), string manageeTenantId = default(string), string manageeTenantName = default(string), string managedByTenantId = default(string), string managedByTenantName = default(string)) + public RegistrationAssignmentPropertiesRegistrationDefinitionProperties(string description = default(string), IList authorizations = default(IList), IList eligibleAuthorizations = default(IList), string registrationDefinitionName = default(string), string provisioningState = default(string), string manageeTenantId = default(string), string manageeTenantName = default(string), string managedByTenantId = default(string), string managedByTenantName = default(string)) { Description = description; Authorizations = authorizations; + EligibleAuthorizations = eligibleAuthorizations; RegistrationDefinitionName = registrationDefinitionName; ProvisioningState = provisioningState; ManageeTenantId = manageeTenantId; @@ -70,54 +81,63 @@ public RegistrationAssignmentPropertiesRegistrationDefinitionProperties() partial void CustomInit(); /// - /// Gets or sets description of the registration definition. + /// Gets or sets the description of the registration definition. /// [JsonProperty(PropertyName = "description")] public string Description { get; set; } /// - /// Gets or sets authorization tuple containing principal id of the - /// user/security group or service principal and id of the build-in - /// role. + /// Gets or sets the collection of authorization objects describing the + /// access Azure Active Directory principals in the managedBy tenant + /// will receive on the delegated resource in the managed tenant. /// [JsonProperty(PropertyName = "authorizations")] public IList Authorizations { get; set; } /// - /// Gets or sets name of the registration definition. + /// Gets or sets the collection of eligible authorization objects + /// describing the just-in-time access Azure Active Directory + /// principals in the managedBy tenant will receive on the delegated + /// resource in the managed tenant. + /// + [JsonProperty(PropertyName = "eligibleAuthorizations")] + public IList EligibleAuthorizations { get; set; } + + /// + /// Gets or sets the name of the registration definition. /// [JsonProperty(PropertyName = "registrationDefinitionName")] public string RegistrationDefinitionName { get; set; } /// - /// Gets or sets current state of the registration definition. Possible - /// values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - /// 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - /// 'Succeeded', 'Updating' + /// Gets or sets the current provisioning state of the registration + /// definition. Possible values include: 'NotSpecified', 'Accepted', + /// 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', + /// 'Canceled', 'Failed', 'Succeeded', 'Updating' /// [JsonProperty(PropertyName = "provisioningState")] public string ProvisioningState { get; set; } /// - /// Gets or sets id of the home tenant. + /// Gets or sets the identifier of the managed tenant. /// [JsonProperty(PropertyName = "manageeTenantId")] public string ManageeTenantId { get; set; } /// - /// Gets or sets name of the home tenant. + /// Gets or sets the name of the managed tenant. /// [JsonProperty(PropertyName = "manageeTenantName")] public string ManageeTenantName { get; set; } /// - /// Gets or sets id of the managedBy tenant. + /// Gets or sets the identifier of the managedBy tenant. /// [JsonProperty(PropertyName = "managedByTenantId")] public string ManagedByTenantId { get; set; } /// - /// Gets or sets name of the managedBy tenant. + /// Gets or sets the name of the managedBy tenant. /// [JsonProperty(PropertyName = "managedByTenantName")] public string ManagedByTenantName { get; set; } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinition.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinition.cs index 65d88d10b5dcb..a630952286f6e 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinition.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinition.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ManagedServices.Models using System.Linq; /// - /// Registration definition. + /// The registration definition. /// public partial class RegistrationDefinition : IResource { @@ -31,13 +31,15 @@ public RegistrationDefinition() /// /// Initializes a new instance of the RegistrationDefinition class. /// - /// Properties of a registration + /// The properties of a registration /// definition. - /// Plan details for the managed services. - /// Fully qualified path of the registration + /// The details for the Managed Services offer’s + /// plan in Azure Marketplace. + /// The fully qualified path of the registration /// definition. - /// Type of the resource. - /// Name of the registration definition. + /// The type of the Azure resource + /// (Microsoft.ManagedServices/registrationDefinitions). + /// The name of the registration definition. public RegistrationDefinition(RegistrationDefinitionProperties properties = default(RegistrationDefinitionProperties), Plan plan = default(Plan), string id = default(string), string type = default(string), string name = default(string)) { Properties = properties; @@ -54,31 +56,33 @@ public RegistrationDefinition() partial void CustomInit(); /// - /// Gets or sets properties of a registration definition. + /// Gets or sets the properties of a registration definition. /// [JsonProperty(PropertyName = "properties")] public RegistrationDefinitionProperties Properties { get; set; } /// - /// Gets or sets plan details for the managed services. + /// Gets or sets the details for the Managed Services offer’s plan in + /// Azure Marketplace. /// [JsonProperty(PropertyName = "plan")] public Plan Plan { get; set; } /// - /// Gets fully qualified path of the registration definition. + /// Gets the fully qualified path of the registration definition. /// [JsonProperty(PropertyName = "id")] public string Id { get; private set; } /// - /// Gets type of the resource. + /// Gets the type of the Azure resource + /// (Microsoft.ManagedServices/registrationDefinitions). /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } /// - /// Gets name of the registration definition. + /// Gets the name of the registration definition. /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinitionProperties.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinitionProperties.cs index 6f1ded14d68fa..e22517bb9018c 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinitionProperties.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/Models/RegistrationDefinitionProperties.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Management.ManagedServices.Models using System.Linq; /// - /// Properties of a registration definition. + /// The properties of a registration definition. /// public partial class RegistrationDefinitionProperties { @@ -34,24 +34,32 @@ public RegistrationDefinitionProperties() /// Initializes a new instance of the RegistrationDefinitionProperties /// class. /// - /// Authorization tuple containing - /// principal id of the user/security group or service principal and id - /// of the build-in role. - /// Id of the managedBy tenant. - /// Description of the registration - /// definition. - /// Name of the registration + /// The collection of authorization + /// objects describing the access Azure Active Directory principals in + /// the managedBy tenant will receive on the delegated resource in the + /// managed tenant. + /// The identifier of the managedBy + /// tenant. + /// The description of the registration /// definition. - /// Current state of the registration - /// definition. Possible values include: 'NotSpecified', 'Accepted', - /// 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', - /// 'Canceled', 'Failed', 'Succeeded', 'Updating' - /// Name of the managedBy + /// The collection of eligible + /// authorization objects describing the just-in-time access Azure + /// Active Directory principals in the managedBy tenant will receive on + /// the delegated resource in the managed tenant. + /// The name of the + /// registration definition. + /// The current provisioning state of + /// the registration definition. Possible values include: + /// 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + /// 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + /// 'Succeeded', 'Updating' + /// The name of the managedBy /// tenant. - public RegistrationDefinitionProperties(IList authorizations, string managedByTenantId, string description = default(string), string registrationDefinitionName = default(string), string provisioningState = default(string), string managedByTenantName = default(string)) + public RegistrationDefinitionProperties(IList authorizations, string managedByTenantId, string description = default(string), IList eligibleAuthorizations = default(IList), string registrationDefinitionName = default(string), string provisioningState = default(string), string managedByTenantName = default(string)) { Description = description; Authorizations = authorizations; + EligibleAuthorizations = eligibleAuthorizations; RegistrationDefinitionName = registrationDefinitionName; ManagedByTenantId = managedByTenantId; ProvisioningState = provisioningState; @@ -65,42 +73,51 @@ public RegistrationDefinitionProperties() partial void CustomInit(); /// - /// Gets or sets description of the registration definition. + /// Gets or sets the description of the registration definition. /// [JsonProperty(PropertyName = "description")] public string Description { get; set; } /// - /// Gets or sets authorization tuple containing principal id of the - /// user/security group or service principal and id of the build-in - /// role. + /// Gets or sets the collection of authorization objects describing the + /// access Azure Active Directory principals in the managedBy tenant + /// will receive on the delegated resource in the managed tenant. /// [JsonProperty(PropertyName = "authorizations")] public IList Authorizations { get; set; } /// - /// Gets or sets name of the registration definition. + /// Gets or sets the collection of eligible authorization objects + /// describing the just-in-time access Azure Active Directory + /// principals in the managedBy tenant will receive on the delegated + /// resource in the managed tenant. + /// + [JsonProperty(PropertyName = "eligibleAuthorizations")] + public IList EligibleAuthorizations { get; set; } + + /// + /// Gets or sets the name of the registration definition. /// [JsonProperty(PropertyName = "registrationDefinitionName")] public string RegistrationDefinitionName { get; set; } /// - /// Gets or sets id of the managedBy tenant. + /// Gets or sets the identifier of the managedBy tenant. /// [JsonProperty(PropertyName = "managedByTenantId")] public string ManagedByTenantId { get; set; } /// - /// Gets current state of the registration definition. Possible values - /// include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - /// 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - /// 'Succeeded', 'Updating' + /// Gets the current provisioning state of the registration definition. + /// Possible values include: 'NotSpecified', 'Accepted', 'Running', + /// 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', + /// 'Failed', 'Succeeded', 'Updating' /// [JsonProperty(PropertyName = "provisioningState")] public string ProvisioningState { get; private set; } /// - /// Gets name of the managedBy tenant. + /// Gets the name of the managedBy tenant. /// [JsonProperty(PropertyName = "managedByTenantName")] public string ManagedByTenantName { get; private set; } @@ -131,6 +148,16 @@ public virtual void Validate() } } } + if (EligibleAuthorizations != null) + { + foreach (var element1 in EligibleAuthorizations) + { + if (element1 != null) + { + element1.Validate(); + } + } + } } } } diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationAssignmentsOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationAssignmentsOperations.cs index 600a7b5d4e769..55314cfeda816 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationAssignmentsOperations.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationAssignmentsOperations.cs @@ -51,17 +51,17 @@ internal RegistrationAssignmentsOperations(ManagedServicesClient client) public ManagedServicesClient Client { get; private set; } /// - /// Gets the details of specified registration assignment. + /// Gets the details of the specified registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// - /// Tells whether to return registration definition details also along with - /// registration assignment details. + /// The flag indicating whether to return the registration definition details + /// along with the registration assignment details. /// /// /// Headers that will be added to request. @@ -249,10 +249,10 @@ internal RegistrationAssignmentsOperations(ManagedServicesClient client) /// Deletes the specified registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The headers that will be added to request. @@ -271,10 +271,10 @@ internal RegistrationAssignmentsOperations(ManagedServicesClient client) /// Creates or updates a registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The parameters required to create new registration assignment. @@ -296,11 +296,11 @@ internal RegistrationAssignmentsOperations(ManagedServicesClient client) /// Gets a list of the registration assignments. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Tells whether to return registration definition details also along with - /// registration assignment details. + /// The flag indicating whether to return the registration definition details + /// along with the registration assignment details. /// /// /// Headers that will be added to request. @@ -482,10 +482,10 @@ internal RegistrationAssignmentsOperations(ManagedServicesClient client) /// Deletes the specified registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// Headers that will be added to request. @@ -647,10 +647,10 @@ internal RegistrationAssignmentsOperations(ManagedServicesClient client) /// Creates or updates a registration assignment. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The parameters required to create new registration assignment. diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationAssignmentsOperationsExtensions.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationAssignmentsOperationsExtensions.cs index c5f1dcff1e1e1..c696bb860dd65 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationAssignmentsOperationsExtensions.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationAssignmentsOperationsExtensions.cs @@ -22,20 +22,20 @@ namespace Microsoft.Azure.Management.ManagedServices public static partial class RegistrationAssignmentsOperationsExtensions { /// - /// Gets the details of specified registration assignment. + /// Gets the details of the specified registration assignment. /// /// /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// - /// Tells whether to return registration definition details also along with - /// registration assignment details. + /// The flag indicating whether to return the registration definition details + /// along with the registration assignment details. /// public static RegistrationAssignment Get(this IRegistrationAssignmentsOperations operations, string scope, string registrationAssignmentId, bool? expandRegistrationDefinition = default(bool?)) { @@ -43,20 +43,20 @@ public static partial class RegistrationAssignmentsOperationsExtensions } /// - /// Gets the details of specified registration assignment. + /// Gets the details of the specified registration assignment. /// /// /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// - /// Tells whether to return registration definition details also along with - /// registration assignment details. + /// The flag indicating whether to return the registration definition details + /// along with the registration assignment details. /// /// /// The cancellation token. @@ -76,10 +76,10 @@ public static partial class RegistrationAssignmentsOperationsExtensions /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// public static void Delete(this IRegistrationAssignmentsOperations operations, string scope, string registrationAssignmentId) { @@ -93,10 +93,10 @@ public static void Delete(this IRegistrationAssignmentsOperations operations, st /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The cancellation token. @@ -113,10 +113,10 @@ public static void Delete(this IRegistrationAssignmentsOperations operations, st /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The parameters required to create new registration assignment. @@ -133,10 +133,10 @@ public static RegistrationAssignment CreateOrUpdate(this IRegistrationAssignment /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The parameters required to create new registration assignment. @@ -159,11 +159,11 @@ public static RegistrationAssignment CreateOrUpdate(this IRegistrationAssignment /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Tells whether to return registration definition details also along with - /// registration assignment details. + /// The flag indicating whether to return the registration definition details + /// along with the registration assignment details. /// public static IPage List(this IRegistrationAssignmentsOperations operations, string scope, bool? expandRegistrationDefinition = default(bool?)) { @@ -177,11 +177,11 @@ public static RegistrationAssignment CreateOrUpdate(this IRegistrationAssignment /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Tells whether to return registration definition details also along with - /// registration assignment details. + /// The flag indicating whether to return the registration definition details + /// along with the registration assignment details. /// /// /// The cancellation token. @@ -201,10 +201,10 @@ public static RegistrationAssignment CreateOrUpdate(this IRegistrationAssignment /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// public static void BeginDelete(this IRegistrationAssignmentsOperations operations, string scope, string registrationAssignmentId) { @@ -218,10 +218,10 @@ public static void BeginDelete(this IRegistrationAssignmentsOperations operation /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The cancellation token. @@ -238,10 +238,10 @@ public static void BeginDelete(this IRegistrationAssignmentsOperations operation /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The parameters required to create new registration assignment. @@ -258,10 +258,10 @@ public static RegistrationAssignment BeginCreateOrUpdate(this IRegistrationAssig /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration assignment. + /// The GUID of the registration assignment. /// /// /// The parameters required to create new registration assignment. diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationDefinitionsOperations.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationDefinitionsOperations.cs index 795cc4fcea558..c5081e444ed25 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationDefinitionsOperations.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationDefinitionsOperations.cs @@ -54,10 +54,10 @@ internal RegistrationDefinitionsOperations(ManagedServicesClient client) /// Gets the registration definition details. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// /// Headers that will be added to request. @@ -240,10 +240,10 @@ internal RegistrationDefinitionsOperations(ManagedServicesClient client) /// Deletes the registration definition. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// /// Headers that will be added to request. @@ -405,13 +405,13 @@ internal RegistrationDefinitionsOperations(ManagedServicesClient client) /// Creates or updates a registration definition. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// The parameters required to create new registration definition. + /// The parameters required to create a new registration definition. /// /// /// The headers that will be added to request. @@ -430,7 +430,7 @@ internal RegistrationDefinitionsOperations(ManagedServicesClient client) /// Gets a list of the registration definitions. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// /// Headers that will be added to request. @@ -607,13 +607,13 @@ internal RegistrationDefinitionsOperations(ManagedServicesClient client) /// Creates or updates a registration definition. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// The parameters required to create new registration definition. + /// The parameters required to create a new registration definition. /// /// /// Headers that will be added to request. diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationDefinitionsOperationsExtensions.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationDefinitionsOperationsExtensions.cs index e86770e032bea..7fdf9e3a64924 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationDefinitionsOperationsExtensions.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/RegistrationDefinitionsOperationsExtensions.cs @@ -28,10 +28,10 @@ public static partial class RegistrationDefinitionsOperationsExtensions /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// public static RegistrationDefinition Get(this IRegistrationDefinitionsOperations operations, string scope, string registrationDefinitionId) { @@ -45,10 +45,10 @@ public static RegistrationDefinition Get(this IRegistrationDefinitionsOperations /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// /// The cancellation token. @@ -68,10 +68,10 @@ public static RegistrationDefinition Get(this IRegistrationDefinitionsOperations /// The operations group for this extension method. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// public static void Delete(this IRegistrationDefinitionsOperations operations, string registrationDefinitionId, string scope) { @@ -85,10 +85,10 @@ public static void Delete(this IRegistrationDefinitionsOperations operations, st /// The operations group for this extension method. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// /// The cancellation token. @@ -105,13 +105,13 @@ public static void Delete(this IRegistrationDefinitionsOperations operations, st /// The operations group for this extension method. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// The parameters required to create new registration definition. + /// The parameters required to create a new registration definition. /// public static RegistrationDefinition CreateOrUpdate(this IRegistrationDefinitionsOperations operations, string registrationDefinitionId, string scope, RegistrationDefinition requestBody) { @@ -125,13 +125,13 @@ public static RegistrationDefinition CreateOrUpdate(this IRegistrationDefinition /// The operations group for this extension method. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// The parameters required to create new registration definition. + /// The parameters required to create a new registration definition. /// /// /// The cancellation token. @@ -151,7 +151,7 @@ public static RegistrationDefinition CreateOrUpdate(this IRegistrationDefinition /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// public static IPage List(this IRegistrationDefinitionsOperations operations, string scope) { @@ -165,7 +165,7 @@ public static IPage List(this IRegistrationDefinitionsOp /// The operations group for this extension method. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// /// The cancellation token. @@ -185,13 +185,13 @@ public static IPage List(this IRegistrationDefinitionsOp /// The operations group for this extension method. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// The parameters required to create new registration definition. + /// The parameters required to create a new registration definition. /// public static RegistrationDefinition BeginCreateOrUpdate(this IRegistrationDefinitionsOperations operations, string registrationDefinitionId, string scope, RegistrationDefinition requestBody) { @@ -205,13 +205,13 @@ public static RegistrationDefinition BeginCreateOrUpdate(this IRegistrationDefin /// The operations group for this extension method. /// /// - /// Guid of the registration definition. + /// The GUID of the registration definition. /// /// - /// Scope of the resource. + /// The scope of the resource. /// /// - /// The parameters required to create new registration definition. + /// The parameters required to create a new registration definition. /// /// /// The cancellation token. diff --git a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/SdkInfo_ManagedServicesClient.cs b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/SdkInfo_ManagedServicesClient.cs index c28da342868c4..58a06f6286f65 100644 --- a/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/SdkInfo_ManagedServicesClient.cs +++ b/sdk/managedservices/Microsoft.Azure.Management.ManagedServices/src/Generated/SdkInfo_ManagedServicesClient.cs @@ -19,9 +19,11 @@ public static IEnumerable> ApiInfo_ManagedServices { return new Tuple[] { - new Tuple("ManagedServices", "Operations", "2019-06-01"), - new Tuple("ManagedServices", "RegistrationAssignments", "2019-06-01"), - new Tuple("ManagedServices", "RegistrationDefinitions", "2019-06-01"), + new Tuple("ManagedServices", "MarketplaceRegistrationDefinitions", "2020-02-01-preview"), + new Tuple("ManagedServices", "MarketplaceRegistrationDefinitionsWithoutScope", "2020-02-01-preview"), + new Tuple("ManagedServices", "Operations", "2020-02-01-preview"), + new Tuple("ManagedServices", "RegistrationAssignments", "2020-02-01-preview"), + new Tuple("ManagedServices", "RegistrationDefinitions", "2020-02-01-preview"), }.AsEnumerable(); } }