Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR Microsoft.Azure.Management.Advisor] [Hub Generated] Review request for Microsoft.Advisor to add version stable/2020-01-01 #9741

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ private void Initialize()
Operations = new Operations(this);
Suppressions = new SuppressionsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2017-04-19";
ApiVersion = "2020-01-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static IPage<ConfigData> ListBySubscription(this IConfigurationsOperation
/// <param name='configContract'>
/// The Azure Advisor configuration data structure.
/// </param>
public static ARMErrorResponseBody CreateInSubscription(this IConfigurationsOperations operations, ConfigData configContract)
public static ConfigData CreateInSubscription(this IConfigurationsOperations operations, ConfigData configContract)
{
return operations.CreateInSubscriptionAsync(configContract).GetAwaiter().GetResult();
}
Expand All @@ -93,7 +93,7 @@ public static ARMErrorResponseBody CreateInSubscription(this IConfigurationsOper
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ARMErrorResponseBody> CreateInSubscriptionAsync(this IConfigurationsOperations operations, ConfigData configContract, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ConfigData> CreateInSubscriptionAsync(this IConfigurationsOperations operations, ConfigData configContract, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CreateInSubscriptionWithHttpMessagesAsync(configContract, null, cancellationToken).ConfigureAwait(false))
{
Expand Down Expand Up @@ -147,7 +147,7 @@ public static IEnumerable<ConfigData> ListByResourceGroup(this IConfigurationsOp
/// <param name='resourceGroup'>
/// The name of the Azure resource group.
/// </param>
public static ARMErrorResponseBody CreateInResourceGroup(this IConfigurationsOperations operations, ConfigData configContract, string resourceGroup)
public static ConfigData CreateInResourceGroup(this IConfigurationsOperations operations, ConfigData configContract, string resourceGroup)
{
return operations.CreateInResourceGroupAsync(configContract, resourceGroup).GetAwaiter().GetResult();
}
Expand All @@ -167,7 +167,7 @@ public static ARMErrorResponseBody CreateInResourceGroup(this IConfigurationsOpe
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ARMErrorResponseBody> CreateInResourceGroupAsync(this IConfigurationsOperations operations, ConfigData configContract, string resourceGroup, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ConfigData> CreateInResourceGroupAsync(this IConfigurationsOperations operations, ConfigData configContract, string resourceGroup, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CreateInResourceGroupWithHttpMessagesAsync(configContract, resourceGroup, null, cancellationToken).ConfigureAwait(false))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public partial interface IConfigurationsOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// <exception cref="ArmErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand All @@ -62,7 +62,7 @@ public partial interface IConfigurationsOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// <exception cref="ArmErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand All @@ -71,7 +71,7 @@ public partial interface IConfigurationsOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<ARMErrorResponseBody>> CreateInSubscriptionWithHttpMessagesAsync(ConfigData configContract, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ConfigData>> CreateInSubscriptionWithHttpMessagesAsync(ConfigData configContract, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Retrieve Azure Advisor configurations.
/// </summary>
Expand All @@ -84,7 +84,7 @@ public partial interface IConfigurationsOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// <exception cref="ArmErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand All @@ -109,7 +109,7 @@ public partial interface IConfigurationsOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// <exception cref="ArmErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand All @@ -118,7 +118,7 @@ public partial interface IConfigurationsOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<ARMErrorResponseBody>> CreateInResourceGroupWithHttpMessagesAsync(ConfigData configContract, string resourceGroup, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ConfigData>> CreateInResourceGroupWithHttpMessagesAsync(ConfigData configContract, string resourceGroup, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Retrieve Azure Advisor configurations.
/// </summary>
Expand All @@ -135,7 +135,7 @@ public partial interface IConfigurationsOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// <exception cref="ArmErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Advisor.Models
{
using Newtonsoft.Json;
using System.Linq;

public partial class ArmErrorResponse
{
/// <summary>
/// Initializes a new instance of the ArmErrorResponse class.
/// </summary>
public ArmErrorResponse()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ArmErrorResponse class.
/// </summary>
public ArmErrorResponse(ARMErrorResponseBody error = default(ARMErrorResponseBody))
{
Error = error;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "error")]
public ARMErrorResponseBody Error { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Advisor.Models
{
using Microsoft.Rest;

/// <summary>
/// Exception thrown for an invalid response with ArmErrorResponse
/// information.
/// </summary>
public partial class ArmErrorResponseException : RestException
{
/// <summary>
/// Gets information about the associated HTTP request.
/// </summary>
public HttpRequestMessageWrapper Request { get; set; }

/// <summary>
/// Gets information about the associated HTTP response.
/// </summary>
public HttpResponseMessageWrapper Response { get; set; }

/// <summary>
/// Gets or sets the body object.
/// </summary>
public ArmErrorResponse Body { get; set; }

/// <summary>
/// Initializes a new instance of the ArmErrorResponseException class.
/// </summary>
public ArmErrorResponseException()
{
}

/// <summary>
/// Initializes a new instance of the ArmErrorResponseException class.
/// </summary>
/// <param name="message">The exception message.</param>
public ArmErrorResponseException(string message)
: this(message, null)
{
}

/// <summary>
/// Initializes a new instance of the ArmErrorResponseException class.
/// </summary>
/// <param name="message">The exception message.</param>
/// <param name="innerException">Inner exception.</param>
public ArmErrorResponseException(string message, System.Exception innerException)
: base(message, innerException)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ public static class Category
public const string Security = "Security";
public const string Performance = "Performance";
public const string Cost = "Cost";
public const string OperationalExcellence = "OperationalExcellence";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@

namespace Microsoft.Azure.Management.Advisor.Models
{
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
/// The Advisor configuration data structure.
/// </summary>
public partial class ConfigData
[Rest.Serialization.JsonTransformation]
public partial class ConfigData : Resource
{
/// <summary>
/// Initializes a new instance of the ConfigData class.
Expand All @@ -29,18 +34,23 @@ public ConfigData()
/// <summary>
/// Initializes a new instance of the ConfigData class.
/// </summary>
/// <param name="id">The resource Id of the configuration
/// resource.</param>
/// <param name="type">The type of the configuration resource.</param>
/// <param name="name">The name of the configuration resource.</param>
/// <param name="properties">The list of property name/value
/// pairs.</param>
public ConfigData(string id = default(string), string type = default(string), string name = default(string), ConfigDataProperties properties = default(ConfigDataProperties))
/// <param name="id">The resource ID.</param>
/// <param name="name">The name of the resource.</param>
/// <param name="type">The type of the resource.</param>
/// <param name="exclude">Exclude the resource from Advisor
/// evaluations. Valid values: False (default) or True.</param>
/// <param name="lowCpuThreshold">Minimum percentage threshold for
/// Advisor low CPU utilization evaluation. Valid only for
/// subscriptions. Valid values: 5 (default), 10, 15 or 20. Possible
/// values include: '5', '10', '15', '20'</param>
/// <param name="digests">Advisor digest configuration. Valid only for
/// subscriptions</param>
public ConfigData(string id = default(string), string name = default(string), string type = default(string), bool? exclude = default(bool?), string lowCpuThreshold = default(string), IList<DigestConfig> digests = default(IList<DigestConfig>))
: base(id, name, type)
{
Id = id;
Type = type;
Name = name;
Properties = properties;
Exclude = exclude;
LowCpuThreshold = lowCpuThreshold;
Digests = digests;
CustomInit();
}

Expand All @@ -50,28 +60,27 @@ public ConfigData()
partial void CustomInit();

/// <summary>
/// Gets or sets the resource Id of the configuration resource.
/// Gets or sets exclude the resource from Advisor evaluations. Valid
/// values: False (default) or True.
/// </summary>
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
[JsonProperty(PropertyName = "properties.exclude")]
public bool? Exclude { get; set; }

/// <summary>
/// Gets or sets the type of the configuration resource.
/// Gets or sets minimum percentage threshold for Advisor low CPU
/// utilization evaluation. Valid only for subscriptions. Valid values:
/// 5 (default), 10, 15 or 20. Possible values include: '5', '10',
/// '15', '20'
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
[JsonProperty(PropertyName = "properties.lowCpuThreshold")]
public string LowCpuThreshold { get; set; }

/// <summary>
/// Gets or sets the name of the configuration resource.
/// Gets or sets advisor digest configuration. Valid only for
/// subscriptions
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }

/// <summary>
/// Gets or sets the list of property name/value pairs.
/// </summary>
[JsonProperty(PropertyName = "properties")]
public ConfigDataProperties Properties { get; set; }
[JsonProperty(PropertyName = "properties.digests")]
public IList<DigestConfig> Digests { get; set; }

}
}
Loading