diff --git a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/IMarketplaceAgreementsOperations.cs b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/IMarketplaceAgreementsOperations.cs index 1213141eebe4..e82673b05fa4 100644 --- a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/IMarketplaceAgreementsOperations.cs +++ b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/IMarketplaceAgreementsOperations.cs @@ -41,7 +41,7 @@ public partial interface IMarketplaceAgreementsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -156,7 +156,7 @@ public partial interface IMarketplaceAgreementsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -175,7 +175,7 @@ public partial interface IMarketplaceAgreementsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceAgreementsOperations.cs b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceAgreementsOperations.cs index f8a57a7da1c2..4e364e851476 100644 --- a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceAgreementsOperations.cs +++ b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceAgreementsOperations.cs @@ -68,7 +68,7 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -193,14 +193,13 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -210,10 +209,6 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -893,7 +888,7 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1015,14 +1010,13 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1032,10 +1026,6 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -1089,7 +1079,7 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1193,14 +1183,13 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1210,10 +1199,6 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); diff --git a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceOrderingAgreementsClient.cs b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceOrderingAgreementsClient.cs index bd6c29cb5c91..298ec6f1dabb 100644 --- a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceOrderingAgreementsClient.cs +++ b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceOrderingAgreementsClient.cs @@ -328,7 +328,7 @@ private void Initialize() MarketplaceAgreements = new MarketplaceAgreementsOperations(this); Operations = new Operations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2015-06-01"; + ApiVersion = "2021-01-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/AgreementTerms.cs b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/AgreementTerms.cs index 69d1a178063a..6b027da166ed 100644 --- a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/AgreementTerms.cs +++ b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/AgreementTerms.cs @@ -45,12 +45,16 @@ public AgreementTerms() /// Publisher terms. /// Link to the privacy policy of the /// publisher. + /// Link to HTML with Azure + /// Marketplace terms. /// Date and time in UTC of when the /// terms were accepted. This is empty if Accepted is false. /// Terms signature. /// If any version of the terms have been /// accepted, otherwise false. - public AgreementTerms(string id = default(string), string name = default(string), string type = default(string), string publisher = default(string), string product = default(string), string plan = default(string), string licenseTextLink = default(string), string privacyPolicyLink = default(string), System.DateTime? retrieveDatetime = default(System.DateTime?), string signature = default(string), bool? accepted = default(bool?)) + /// The system meta data relating to this + /// resource. + public AgreementTerms(string id = default(string), string name = default(string), string type = default(string), string publisher = default(string), string product = default(string), string plan = default(string), string licenseTextLink = default(string), string privacyPolicyLink = default(string), string marketplaceTermsLink = default(string), System.DateTime? retrieveDatetime = default(System.DateTime?), string signature = default(string), bool? accepted = default(bool?), SystemData systemData = default(SystemData)) : base(id, name, type) { Publisher = publisher; @@ -58,9 +62,11 @@ public AgreementTerms() Plan = plan; LicenseTextLink = licenseTextLink; PrivacyPolicyLink = privacyPolicyLink; + MarketplaceTermsLink = marketplaceTermsLink; RetrieveDatetime = retrieveDatetime; Signature = signature; Accepted = accepted; + SystemData = systemData; CustomInit(); } @@ -99,6 +105,12 @@ public AgreementTerms() [JsonProperty(PropertyName = "properties.privacyPolicyLink")] public string PrivacyPolicyLink { get; set; } + /// + /// Gets or sets link to HTML with Azure Marketplace terms. + /// + [JsonProperty(PropertyName = "properties.marketplaceTermsLink")] + public string MarketplaceTermsLink { get; set; } + /// /// Gets or sets date and time in UTC of when the terms were accepted. /// This is empty if Accepted is false. @@ -119,5 +131,11 @@ public AgreementTerms() [JsonProperty(PropertyName = "properties.accepted")] public bool? Accepted { get; set; } + /// + /// Gets the system meta data relating to this resource. + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + } } diff --git a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/CreatedByType.cs b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/CreatedByType.cs new file mode 100644 index 000000000000..b0428522f9a0 --- /dev/null +++ b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/CreatedByType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.MarketplaceOrdering.Models +{ + + /// + /// Defines values for CreatedByType. + /// + public static class CreatedByType + { + public const string User = "User"; + public const string Application = "Application"; + public const string ManagedIdentity = "ManagedIdentity"; + public const string Key = "Key"; + } +} diff --git a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/SystemData.cs b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/SystemData.cs new file mode 100644 index 000000000000..1cfe516bfc4f --- /dev/null +++ b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/Models/SystemData.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.MarketplaceOrdering.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Metadata pertaining to creation and last modification of the resource. + /// + public partial class SystemData + { + /// + /// Initializes a new instance of the SystemData class. + /// + public SystemData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SystemData class. + /// + /// The identity that created the + /// resource. + /// The type of identity that created the + /// resource. Possible values include: 'User', 'Application', + /// 'ManagedIdentity', 'Key' + /// The timestamp of resource creation + /// (UTC). + /// The identity that last modified the + /// resource. + /// The type of identity that last + /// modified the resource. Possible values include: 'User', + /// 'Application', 'ManagedIdentity', 'Key' + /// The timestamp of resource last + /// modification (UTC) + public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) + { + CreatedBy = createdBy; + CreatedByType = createdByType; + CreatedAt = createdAt; + LastModifiedBy = lastModifiedBy; + LastModifiedByType = lastModifiedByType; + LastModifiedAt = lastModifiedAt; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identity that created the resource. + /// + [JsonProperty(PropertyName = "createdBy")] + public string CreatedBy { get; set; } + + /// + /// Gets or sets the type of identity that created the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "createdByType")] + public string CreatedByType { get; set; } + + /// + /// Gets or sets the timestamp of resource creation (UTC). + /// + [JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt { get; set; } + + /// + /// Gets or sets the identity that last modified the resource. + /// + [JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy { get; set; } + + /// + /// Gets or sets the type of identity that last modified the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', + /// 'Key' + /// + [JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType { get; set; } + + /// + /// Gets or sets the timestamp of resource last modification (UTC) + /// + [JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt { get; set; } + + } +} diff --git a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/SdkInfo_MarketplaceOrderingAgreements.cs b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/SdkInfo_MarketplaceOrderingAgreements.cs index db1ddbeb6680..134243e7d5ea 100644 --- a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/SdkInfo_MarketplaceOrderingAgreements.cs +++ b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/SdkInfo_MarketplaceOrderingAgreements.cs @@ -19,8 +19,8 @@ public static IEnumerable> ApiInfo_MarketplaceOrde { return new Tuple[] { - new Tuple("MarketplaceOrdering", "MarketplaceAgreements", "2015-06-01"), - new Tuple("MarketplaceOrdering", "Operations", "2015-06-01"), + new Tuple("MarketplaceOrdering", "MarketplaceAgreements", "2021-01-01"), + new Tuple("MarketplaceOrdering", "Operations", "2021-01-01"), }.AsEnumerable(); } }