diff --git a/sdk/advisor/azure-mgmt-advisor/HISTORY.rst b/sdk/advisor/azure-mgmt-advisor/HISTORY.rst index d2e94fbc70c5..eb7e439fd4b0 100644 --- a/sdk/advisor/azure-mgmt-advisor/HISTORY.rst +++ b/sdk/advisor/azure-mgmt-advisor/HISTORY.rst @@ -3,6 +3,22 @@ Release History =============== +3.0.0 (2019-10-24) +++++++++++++++++++ + +**Features** + +- Added operation group RecommendationMetadataOperations + +**General Breaking Changes** + +This version uses a next-generation code generator that might introduce breaking changes if from some import. In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. +AdvisorManagementClient cannot be imported from azure.mgmt.advisor.advisor_management_client anymore (import from azure.mgmt.advisor works like before) +AdvisorManagementClientConfiguration import has been moved from azure.mgmt.advisor.advisor_management_client to azure.mgmt.advisor +A model MyClass from a "models" sub-module cannot be imported anymore using azure.mgmt.advisor.models.my_class (import from azure.mgmt.advisor.models works like before) +An operation class MyClassOperations from an operations sub-module cannot be imported anymore using azure.mgmt.advisor.operations.my_class_operations (import from azure.mgmt.advisor.operations works like before) +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 2.0.1 (2018-10-16) ++++++++++++++++++ diff --git a/sdk/advisor/azure-mgmt-advisor/README.rst b/sdk/advisor/azure-mgmt-advisor/README.rst index 6003eb1914e8..44961350d55b 100644 --- a/sdk/advisor/azure-mgmt-advisor/README.rst +++ b/sdk/advisor/azure-mgmt-advisor/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Advisor Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/__init__.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/__init__.py index 28920b3de1b6..90ed77e9ad58 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/__init__.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .advisor_management_client import AdvisorManagementClient -from .version import VERSION +from ._configuration import AdvisorManagementClientConfiguration +from ._advisor_management_client import AdvisorManagementClient +__all__ = ['AdvisorManagementClient', 'AdvisorManagementClientConfiguration'] -__all__ = ['AdvisorManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/advisor_management_client.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_advisor_management_client.py similarity index 63% rename from sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/advisor_management_client.py rename to sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_advisor_management_client.py index 0b162d69bd1b..ad34fa86ea9e 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/advisor_management_client.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_advisor_management_client.py @@ -11,45 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.configurations_operations import ConfigurationsOperations -from .operations.recommendations_operations import RecommendationsOperations -from .operations.operations import Operations -from .operations.suppressions_operations import SuppressionsOperations -from . import models - - -class AdvisorManagementClientConfiguration(AzureConfiguration): - """Configuration for AdvisorManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(AdvisorManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-advisor/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import AdvisorManagementClientConfiguration +from .operations import RecommendationMetadataOperations +from .operations import ConfigurationsOperations +from .operations import RecommendationsOperations +from .operations import Operations +from .operations import SuppressionsOperations +from . import models class AdvisorManagementClient(SDKClient): @@ -58,6 +27,8 @@ class AdvisorManagementClient(SDKClient): :ivar config: Configuration for client. :vartype config: AdvisorManagementClientConfiguration + :ivar recommendation_metadata: RecommendationMetadata operations + :vartype recommendation_metadata: azure.mgmt.advisor.operations.RecommendationMetadataOperations :ivar configurations: Configurations operations :vartype configurations: azure.mgmt.advisor.operations.ConfigurationsOperations :ivar recommendations: Recommendations operations @@ -86,6 +57,8 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) + self.recommendation_metadata = RecommendationMetadataOperations( + self._client, self.config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations( self._client, self.config, self._serialize, self._deserialize) self.recommendations = RecommendationsOperations( diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_configuration.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_configuration.py new file mode 100644 index 000000000000..84492c983e05 --- /dev/null +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class AdvisorManagementClientConfiguration(AzureConfiguration): + """Configuration for AdvisorManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AdvisorManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-advisor/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/__init__.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/__init__.py index 45155f314ad3..d12d43fe96aa 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/__init__.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/__init__.py @@ -10,49 +10,59 @@ # -------------------------------------------------------------------------- try: - from .config_data_properties_py3 import ConfigDataProperties - from .config_data_py3 import ConfigData - from .arm_error_response_body_py3 import ARMErrorResponseBody - from .short_description_py3 import ShortDescription - from .resource_recommendation_base_py3 import ResourceRecommendationBase - from .resource_py3 import Resource - from .operation_display_info_py3 import OperationDisplayInfo - from .operation_entity_py3 import OperationEntity - from .suppression_contract_py3 import SuppressionContract + from ._models_py3 import ARMErrorResponseBody + from ._models_py3 import ConfigData + from ._models_py3 import ConfigDataProperties + from ._models_py3 import MetadataEntity + from ._models_py3 import MetadataSupportedValueDetail + from ._models_py3 import OperationDisplayInfo + from ._models_py3 import OperationEntity + from ._models_py3 import Resource + from ._models_py3 import ResourceRecommendationBase + from ._models_py3 import ShortDescription + from ._models_py3 import SuppressionContract except (SyntaxError, ImportError): - from .config_data_properties import ConfigDataProperties - from .config_data import ConfigData - from .arm_error_response_body import ARMErrorResponseBody - from .short_description import ShortDescription - from .resource_recommendation_base import ResourceRecommendationBase - from .resource import Resource - from .operation_display_info import OperationDisplayInfo - from .operation_entity import OperationEntity - from .suppression_contract import SuppressionContract -from .config_data_paged import ConfigDataPaged -from .resource_recommendation_base_paged import ResourceRecommendationBasePaged -from .operation_entity_paged import OperationEntityPaged -from .suppression_contract_paged import SuppressionContractPaged -from .advisor_management_client_enums import ( + from ._models import ARMErrorResponseBody + from ._models import ConfigData + from ._models import ConfigDataProperties + from ._models import MetadataEntity + from ._models import MetadataSupportedValueDetail + from ._models import OperationDisplayInfo + from ._models import OperationEntity + from ._models import Resource + from ._models import ResourceRecommendationBase + from ._models import ShortDescription + from ._models import SuppressionContract +from ._paged_models import ConfigDataPaged +from ._paged_models import MetadataEntityPaged +from ._paged_models import OperationEntityPaged +from ._paged_models import ResourceRecommendationBasePaged +from ._paged_models import SuppressionContractPaged +from ._advisor_management_client_enums import ( + Scenario, Category, Impact, Risk, ) __all__ = [ - 'ConfigDataProperties', - 'ConfigData', 'ARMErrorResponseBody', - 'ShortDescription', - 'ResourceRecommendationBase', - 'Resource', + 'ConfigData', + 'ConfigDataProperties', + 'MetadataEntity', + 'MetadataSupportedValueDetail', 'OperationDisplayInfo', 'OperationEntity', + 'Resource', + 'ResourceRecommendationBase', + 'ShortDescription', 'SuppressionContract', + 'MetadataEntityPaged', 'ConfigDataPaged', 'ResourceRecommendationBasePaged', 'OperationEntityPaged', 'SuppressionContractPaged', + 'Scenario', 'Category', 'Impact', 'Risk', diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/advisor_management_client_enums.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_advisor_management_client_enums.py similarity index 88% rename from sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/advisor_management_client_enums.py rename to sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_advisor_management_client_enums.py index 477dbe954da5..d925fb682389 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/advisor_management_client_enums.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_advisor_management_client_enums.py @@ -12,12 +12,18 @@ from enum import Enum +class Scenario(str, Enum): + + alerts = "Alerts" + + class Category(str, Enum): high_availability = "HighAvailability" security = "Security" performance = "Performance" cost = "Cost" + operational_excellence = "OperationalExcellence" class Impact(str, Enum): diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_models.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_models.py new file mode 100644 index 000000000000..c1a8ad5fb1f4 --- /dev/null +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_models.py @@ -0,0 +1,382 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ARMErrorResponseBody(Model): + """ARM error response body. + + :param message: Gets or sets the string that describes the error in detail + and provides debugging information. + :type message: str + :param code: Gets or sets the string that can be used to programmatically + identify the error. + :type code: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ARMErrorResponseBody, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.code = kwargs.get('code', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConfigData(Model): + """The Advisor configuration data structure. + + :param id: The resource Id of the configuration resource. + :type id: str + :param type: The type of the configuration resource. + :type type: str + :param name: The name of the configuration resource. + :type name: str + :param properties: The list of property name/value pairs. + :type properties: ~azure.mgmt.advisor.models.ConfigDataProperties + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ConfigDataProperties'}, + } + + def __init__(self, **kwargs): + super(ConfigData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.name = kwargs.get('name', None) + self.properties = kwargs.get('properties', None) + + +class ConfigDataProperties(Model): + """The list of property name/value pairs. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param exclude: Exclude the resource from Advisor evaluations. Valid + values: False (default) or True. + :type exclude: bool + :param low_cpu_threshold: Minimum percentage threshold for Advisor low CPU + utilization evaluation. Valid only for subscriptions. Valid values: 5 + (default), 10, 15 or 20. + :type low_cpu_threshold: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'exclude': {'key': 'exclude', 'type': 'bool'}, + 'low_cpu_threshold': {'key': 'low_cpu_threshold', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConfigDataProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.exclude = kwargs.get('exclude', None) + self.low_cpu_threshold = kwargs.get('low_cpu_threshold', None) + + +class MetadataEntity(Model): + """The metadata entity contract. + + :param id: The resource Id of the metadata entity. + :type id: str + :param type: The type of the metadata entity. + :type type: str + :param name: The name of the metadata entity. + :type name: str + :param display_name: The display name. + :type display_name: str + :param depends_on: The list of keys on which this entity depends on. + :type depends_on: list[str] + :param applicable_scenarios: The list of scenarios applicable to this + metadata entity. + :type applicable_scenarios: list[str or + ~azure.mgmt.advisor.models.Scenario] + :param supported_values: The list of supported values. + :type supported_values: + list[~azure.mgmt.advisor.models.MetadataSupportedValueDetail] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'}, + 'applicable_scenarios': {'key': 'properties.applicableScenarios', 'type': '[str]'}, + 'supported_values': {'key': 'properties.supportedValues', 'type': '[MetadataSupportedValueDetail]'}, + } + + def __init__(self, **kwargs): + super(MetadataEntity, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.depends_on = kwargs.get('depends_on', None) + self.applicable_scenarios = kwargs.get('applicable_scenarios', None) + self.supported_values = kwargs.get('supported_values', None) + + +class MetadataSupportedValueDetail(Model): + """The metadata supported value detail. + + :param id: The id. + :type id: str + :param display_name: The display name. + :type display_name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetadataSupportedValueDetail, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.display_name = kwargs.get('display_name', None) + + +class OperationDisplayInfo(Model): + """The operation supported by Advisor. + + :param description: The description of the operation. + :type description: str + :param operation: The action that users can perform, based on their + permission level. + :type operation: str + :param provider: Service provider: Microsoft Advisor. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplayInfo, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.operation = kwargs.get('operation', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + + +class OperationEntity(Model): + """The operation supported by Advisor. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The operation supported by Advisor. + :type display: ~azure.mgmt.advisor.models.OperationDisplayInfo + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, + } + + def __init__(self, **kwargs): + super(OperationEntity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ResourceRecommendationBase(Resource): + """Advisor Recommendation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param category: The category of the recommendation. Possible values + include: 'HighAvailability', 'Security', 'Performance', 'Cost', + 'OperationalExcellence' + :type category: str or ~azure.mgmt.advisor.models.Category + :param impact: The business impact of the recommendation. Possible values + include: 'High', 'Medium', 'Low' + :type impact: str or ~azure.mgmt.advisor.models.Impact + :param impacted_field: The resource type identified by Advisor. + :type impacted_field: str + :param impacted_value: The resource identified by Advisor. + :type impacted_value: str + :param last_updated: The most recent time that Advisor checked the + validity of the recommendation. + :type last_updated: datetime + :param metadata: The recommendation metadata. + :type metadata: dict[str, object] + :param recommendation_type_id: The recommendation-type GUID. + :type recommendation_type_id: str + :param risk: The potential risk of not implementing the recommendation. + Possible values include: 'Error', 'Warning', 'None' + :type risk: str or ~azure.mgmt.advisor.models.Risk + :param short_description: A summary of the recommendation. + :type short_description: ~azure.mgmt.advisor.models.ShortDescription + :param suppression_ids: The list of snoozed and dismissed rules for the + recommendation. + :type suppression_ids: list[str] + :param extended_properties: Extended properties + :type extended_properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'impact': {'key': 'properties.impact', 'type': 'str'}, + 'impacted_field': {'key': 'properties.impactedField', 'type': 'str'}, + 'impacted_value': {'key': 'properties.impactedValue', 'type': 'str'}, + 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': '{object}'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'risk': {'key': 'properties.risk', 'type': 'str'}, + 'short_description': {'key': 'properties.shortDescription', 'type': 'ShortDescription'}, + 'suppression_ids': {'key': 'properties.suppressionIds', 'type': '[str]'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceRecommendationBase, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.impact = kwargs.get('impact', None) + self.impacted_field = kwargs.get('impacted_field', None) + self.impacted_value = kwargs.get('impacted_value', None) + self.last_updated = kwargs.get('last_updated', None) + self.metadata = kwargs.get('metadata', None) + self.recommendation_type_id = kwargs.get('recommendation_type_id', None) + self.risk = kwargs.get('risk', None) + self.short_description = kwargs.get('short_description', None) + self.suppression_ids = kwargs.get('suppression_ids', None) + self.extended_properties = kwargs.get('extended_properties', None) + + +class ShortDescription(Model): + """A summary of the recommendation. + + :param problem: The issue or opportunity identified by the recommendation. + :type problem: str + :param solution: The remediation action suggested by the recommendation. + :type solution: str + """ + + _attribute_map = { + 'problem': {'key': 'problem', 'type': 'str'}, + 'solution': {'key': 'solution', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShortDescription, self).__init__(**kwargs) + self.problem = kwargs.get('problem', None) + self.solution = kwargs.get('solution', None) + + +class SuppressionContract(Resource): + """The details of the snoozed or dismissed rule; for example, the duration, + name, and GUID associated with the rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param suppression_id: The GUID of the suppression. + :type suppression_id: str + :param ttl: The duration for which the suppression is valid. + :type ttl: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_id': {'key': 'properties.suppressionId', 'type': 'str'}, + 'ttl': {'key': 'properties.ttl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SuppressionContract, self).__init__(**kwargs) + self.suppression_id = kwargs.get('suppression_id', None) + self.ttl = kwargs.get('ttl', None) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_models_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_models_py3.py new file mode 100644 index 000000000000..59b4752e6036 --- /dev/null +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_models_py3.py @@ -0,0 +1,382 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ARMErrorResponseBody(Model): + """ARM error response body. + + :param message: Gets or sets the string that describes the error in detail + and provides debugging information. + :type message: str + :param code: Gets or sets the string that can be used to programmatically + identify the error. + :type code: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, code: str=None, **kwargs) -> None: + super(ARMErrorResponseBody, self).__init__(**kwargs) + self.message = message + self.code = code + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConfigData(Model): + """The Advisor configuration data structure. + + :param id: The resource Id of the configuration resource. + :type id: str + :param type: The type of the configuration resource. + :type type: str + :param name: The name of the configuration resource. + :type name: str + :param properties: The list of property name/value pairs. + :type properties: ~azure.mgmt.advisor.models.ConfigDataProperties + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ConfigDataProperties'}, + } + + def __init__(self, *, id: str=None, type: str=None, name: str=None, properties=None, **kwargs) -> None: + super(ConfigData, self).__init__(**kwargs) + self.id = id + self.type = type + self.name = name + self.properties = properties + + +class ConfigDataProperties(Model): + """The list of property name/value pairs. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param exclude: Exclude the resource from Advisor evaluations. Valid + values: False (default) or True. + :type exclude: bool + :param low_cpu_threshold: Minimum percentage threshold for Advisor low CPU + utilization evaluation. Valid only for subscriptions. Valid values: 5 + (default), 10, 15 or 20. + :type low_cpu_threshold: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'exclude': {'key': 'exclude', 'type': 'bool'}, + 'low_cpu_threshold': {'key': 'low_cpu_threshold', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, exclude: bool=None, low_cpu_threshold: str=None, **kwargs) -> None: + super(ConfigDataProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.exclude = exclude + self.low_cpu_threshold = low_cpu_threshold + + +class MetadataEntity(Model): + """The metadata entity contract. + + :param id: The resource Id of the metadata entity. + :type id: str + :param type: The type of the metadata entity. + :type type: str + :param name: The name of the metadata entity. + :type name: str + :param display_name: The display name. + :type display_name: str + :param depends_on: The list of keys on which this entity depends on. + :type depends_on: list[str] + :param applicable_scenarios: The list of scenarios applicable to this + metadata entity. + :type applicable_scenarios: list[str or + ~azure.mgmt.advisor.models.Scenario] + :param supported_values: The list of supported values. + :type supported_values: + list[~azure.mgmt.advisor.models.MetadataSupportedValueDetail] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'depends_on': {'key': 'properties.dependsOn', 'type': '[str]'}, + 'applicable_scenarios': {'key': 'properties.applicableScenarios', 'type': '[str]'}, + 'supported_values': {'key': 'properties.supportedValues', 'type': '[MetadataSupportedValueDetail]'}, + } + + def __init__(self, *, id: str=None, type: str=None, name: str=None, display_name: str=None, depends_on=None, applicable_scenarios=None, supported_values=None, **kwargs) -> None: + super(MetadataEntity, self).__init__(**kwargs) + self.id = id + self.type = type + self.name = name + self.display_name = display_name + self.depends_on = depends_on + self.applicable_scenarios = applicable_scenarios + self.supported_values = supported_values + + +class MetadataSupportedValueDetail(Model): + """The metadata supported value detail. + + :param id: The id. + :type id: str + :param display_name: The display name. + :type display_name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, display_name: str=None, **kwargs) -> None: + super(MetadataSupportedValueDetail, self).__init__(**kwargs) + self.id = id + self.display_name = display_name + + +class OperationDisplayInfo(Model): + """The operation supported by Advisor. + + :param description: The description of the operation. + :type description: str + :param operation: The action that users can perform, based on their + permission level. + :type operation: str + :param provider: Service provider: Microsoft Advisor. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, operation: str=None, provider: str=None, resource: str=None, **kwargs) -> None: + super(OperationDisplayInfo, self).__init__(**kwargs) + self.description = description + self.operation = operation + self.provider = provider + self.resource = resource + + +class OperationEntity(Model): + """The operation supported by Advisor. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The operation supported by Advisor. + :type display: ~azure.mgmt.advisor.models.OperationDisplayInfo + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(OperationEntity, self).__init__(**kwargs) + self.name = name + self.display = display + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ResourceRecommendationBase(Resource): + """Advisor Recommendation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param category: The category of the recommendation. Possible values + include: 'HighAvailability', 'Security', 'Performance', 'Cost', + 'OperationalExcellence' + :type category: str or ~azure.mgmt.advisor.models.Category + :param impact: The business impact of the recommendation. Possible values + include: 'High', 'Medium', 'Low' + :type impact: str or ~azure.mgmt.advisor.models.Impact + :param impacted_field: The resource type identified by Advisor. + :type impacted_field: str + :param impacted_value: The resource identified by Advisor. + :type impacted_value: str + :param last_updated: The most recent time that Advisor checked the + validity of the recommendation. + :type last_updated: datetime + :param metadata: The recommendation metadata. + :type metadata: dict[str, object] + :param recommendation_type_id: The recommendation-type GUID. + :type recommendation_type_id: str + :param risk: The potential risk of not implementing the recommendation. + Possible values include: 'Error', 'Warning', 'None' + :type risk: str or ~azure.mgmt.advisor.models.Risk + :param short_description: A summary of the recommendation. + :type short_description: ~azure.mgmt.advisor.models.ShortDescription + :param suppression_ids: The list of snoozed and dismissed rules for the + recommendation. + :type suppression_ids: list[str] + :param extended_properties: Extended properties + :type extended_properties: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'impact': {'key': 'properties.impact', 'type': 'str'}, + 'impacted_field': {'key': 'properties.impactedField', 'type': 'str'}, + 'impacted_value': {'key': 'properties.impactedValue', 'type': 'str'}, + 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': '{object}'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'risk': {'key': 'properties.risk', 'type': 'str'}, + 'short_description': {'key': 'properties.shortDescription', 'type': 'ShortDescription'}, + 'suppression_ids': {'key': 'properties.suppressionIds', 'type': '[str]'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, *, category=None, impact=None, impacted_field: str=None, impacted_value: str=None, last_updated=None, metadata=None, recommendation_type_id: str=None, risk=None, short_description=None, suppression_ids=None, extended_properties=None, **kwargs) -> None: + super(ResourceRecommendationBase, self).__init__(**kwargs) + self.category = category + self.impact = impact + self.impacted_field = impacted_field + self.impacted_value = impacted_value + self.last_updated = last_updated + self.metadata = metadata + self.recommendation_type_id = recommendation_type_id + self.risk = risk + self.short_description = short_description + self.suppression_ids = suppression_ids + self.extended_properties = extended_properties + + +class ShortDescription(Model): + """A summary of the recommendation. + + :param problem: The issue or opportunity identified by the recommendation. + :type problem: str + :param solution: The remediation action suggested by the recommendation. + :type solution: str + """ + + _attribute_map = { + 'problem': {'key': 'problem', 'type': 'str'}, + 'solution': {'key': 'solution', 'type': 'str'}, + } + + def __init__(self, *, problem: str=None, solution: str=None, **kwargs) -> None: + super(ShortDescription, self).__init__(**kwargs) + self.problem = problem + self.solution = solution + + +class SuppressionContract(Resource): + """The details of the snoozed or dismissed rule; for example, the duration, + name, and GUID associated with the rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param suppression_id: The GUID of the suppression. + :type suppression_id: str + :param ttl: The duration for which the suppression is valid. + :type ttl: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_id': {'key': 'properties.suppressionId', 'type': 'str'}, + 'ttl': {'key': 'properties.ttl', 'type': 'str'}, + } + + def __init__(self, *, suppression_id: str=None, ttl: str=None, **kwargs) -> None: + super(SuppressionContract, self).__init__(**kwargs) + self.suppression_id = suppression_id + self.ttl = ttl diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_paged_models.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_paged_models.py new file mode 100644 index 000000000000..c8d31255c203 --- /dev/null +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_paged_models.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class MetadataEntityPaged(Paged): + """ + A paging container for iterating over a list of :class:`MetadataEntity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MetadataEntity]'} + } + + def __init__(self, *args, **kwargs): + + super(MetadataEntityPaged, self).__init__(*args, **kwargs) +class ConfigDataPaged(Paged): + """ + A paging container for iterating over a list of :class:`ConfigData ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ConfigData]'} + } + + def __init__(self, *args, **kwargs): + + super(ConfigDataPaged, self).__init__(*args, **kwargs) +class ResourceRecommendationBasePaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceRecommendationBase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceRecommendationBase]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceRecommendationBasePaged, self).__init__(*args, **kwargs) +class OperationEntityPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationEntity ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationEntity]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationEntityPaged, self).__init__(*args, **kwargs) +class SuppressionContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`SuppressionContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SuppressionContract]'} + } + + def __init__(self, *args, **kwargs): + + super(SuppressionContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/arm_error_response_body.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/arm_error_response_body.py deleted file mode 100644 index ae0fff677a8f..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/arm_error_response_body.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ARMErrorResponseBody(Model): - """ARM error response body. - - :param message: Gets or sets the string that describes the error in detail - and provides debugging information. - :type message: str - :param code: Gets or sets the string that can be used to programmatically - identify the error. - :type code: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ARMErrorResponseBody, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.code = kwargs.get('code', None) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/arm_error_response_body_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/arm_error_response_body_py3.py deleted file mode 100644 index 1a79f9387110..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/arm_error_response_body_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ARMErrorResponseBody(Model): - """ARM error response body. - - :param message: Gets or sets the string that describes the error in detail - and provides debugging information. - :type message: str - :param code: Gets or sets the string that can be used to programmatically - identify the error. - :type code: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, code: str=None, **kwargs) -> None: - super(ARMErrorResponseBody, self).__init__(**kwargs) - self.message = message - self.code = code diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data.py deleted file mode 100644 index 534a0e11eb79..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConfigData(Model): - """The Advisor configuration data structure. - - :param id: The resource Id of the configuration resource. - :type id: str - :param type: The type of the configuration resource. - :type type: str - :param name: The name of the configuration resource. - :type name: str - :param properties: The list of property name/value pairs. - :type properties: ~azure.mgmt.advisor.models.ConfigDataProperties - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ConfigDataProperties'}, - } - - def __init__(self, **kwargs): - super(ConfigData, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.type = kwargs.get('type', None) - self.name = kwargs.get('name', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_paged.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_paged.py deleted file mode 100644 index 9c35c2eaccc4..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ConfigDataPaged(Paged): - """ - A paging container for iterating over a list of :class:`ConfigData ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ConfigData]'} - } - - def __init__(self, *args, **kwargs): - - super(ConfigDataPaged, self).__init__(*args, **kwargs) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_properties.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_properties.py deleted file mode 100644 index cc0303d1c606..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConfigDataProperties(Model): - """The list of property name/value pairs. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param exclude: Exclude the resource from Advisor evaluations. Valid - values: False (default) or True. - :type exclude: bool - :param low_cpu_threshold: Minimum percentage threshold for Advisor low CPU - utilization evaluation. Valid only for subscriptions. Valid values: 5 - (default), 10, 15 or 20. - :type low_cpu_threshold: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'exclude': {'key': 'exclude', 'type': 'bool'}, - 'low_cpu_threshold': {'key': 'low_cpu_threshold', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConfigDataProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.exclude = kwargs.get('exclude', None) - self.low_cpu_threshold = kwargs.get('low_cpu_threshold', None) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_properties_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_properties_py3.py deleted file mode 100644 index f52c01d6dafe..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConfigDataProperties(Model): - """The list of property name/value pairs. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param exclude: Exclude the resource from Advisor evaluations. Valid - values: False (default) or True. - :type exclude: bool - :param low_cpu_threshold: Minimum percentage threshold for Advisor low CPU - utilization evaluation. Valid only for subscriptions. Valid values: 5 - (default), 10, 15 or 20. - :type low_cpu_threshold: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'exclude': {'key': 'exclude', 'type': 'bool'}, - 'low_cpu_threshold': {'key': 'low_cpu_threshold', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, exclude: bool=None, low_cpu_threshold: str=None, **kwargs) -> None: - super(ConfigDataProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.exclude = exclude - self.low_cpu_threshold = low_cpu_threshold diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_py3.py deleted file mode 100644 index c8e7c45215c4..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/config_data_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConfigData(Model): - """The Advisor configuration data structure. - - :param id: The resource Id of the configuration resource. - :type id: str - :param type: The type of the configuration resource. - :type type: str - :param name: The name of the configuration resource. - :type name: str - :param properties: The list of property name/value pairs. - :type properties: ~azure.mgmt.advisor.models.ConfigDataProperties - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ConfigDataProperties'}, - } - - def __init__(self, *, id: str=None, type: str=None, name: str=None, properties=None, **kwargs) -> None: - super(ConfigData, self).__init__(**kwargs) - self.id = id - self.type = type - self.name = name - self.properties = properties diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_display_info.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_display_info.py deleted file mode 100644 index d4f103558727..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_display_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplayInfo(Model): - """The operation supported by Advisor. - - :param description: The description of the operation. - :type description: str - :param operation: The action that users can perform, based on their - permission level. - :type operation: str - :param provider: Service provider: Microsoft Advisor. - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplayInfo, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.operation = kwargs.get('operation', None) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_display_info_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_display_info_py3.py deleted file mode 100644 index 24ca7bb48ec2..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_display_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplayInfo(Model): - """The operation supported by Advisor. - - :param description: The description of the operation. - :type description: str - :param operation: The action that users can perform, based on their - permission level. - :type operation: str - :param provider: Service provider: Microsoft Advisor. - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, operation: str=None, provider: str=None, resource: str=None, **kwargs) -> None: - super(OperationDisplayInfo, self).__init__(**kwargs) - self.description = description - self.operation = operation - self.provider = provider - self.resource = resource diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_entity.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_entity.py deleted file mode 100644 index 9872949cbe52..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_entity.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationEntity(Model): - """The operation supported by Advisor. - - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: The operation supported by Advisor. - :type display: ~azure.mgmt.advisor.models.OperationDisplayInfo - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, - } - - def __init__(self, **kwargs): - super(OperationEntity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_entity_paged.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_entity_paged.py deleted file mode 100644 index 4c25751c49a1..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_entity_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationEntityPaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationEntity ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationEntity]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationEntityPaged, self).__init__(*args, **kwargs) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_entity_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_entity_py3.py deleted file mode 100644 index 24c1b1b6eb82..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/operation_entity_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationEntity(Model): - """The operation supported by Advisor. - - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: The operation supported by Advisor. - :type display: ~azure.mgmt.advisor.models.OperationDisplayInfo - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(OperationEntity, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource.py deleted file mode 100644 index f43f76f15a74..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource ID. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_py3.py deleted file mode 100644 index 33023c8d186f..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource ID. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_recommendation_base.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_recommendation_base.py deleted file mode 100644 index 39a93d0b2764..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_recommendation_base.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ResourceRecommendationBase(Resource): - """Advisor Recommendation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource ID. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param category: The category of the recommendation. Possible values - include: 'HighAvailability', 'Security', 'Performance', 'Cost' - :type category: str or ~azure.mgmt.advisor.models.Category - :param impact: The business impact of the recommendation. Possible values - include: 'High', 'Medium', 'Low' - :type impact: str or ~azure.mgmt.advisor.models.Impact - :param impacted_field: The resource type identified by Advisor. - :type impacted_field: str - :param impacted_value: The resource identified by Advisor. - :type impacted_value: str - :param last_updated: The most recent time that Advisor checked the - validity of the recommendation. - :type last_updated: datetime - :param metadata: The recommendation metadata. - :type metadata: dict[str, object] - :param recommendation_type_id: The recommendation-type GUID. - :type recommendation_type_id: str - :param risk: The potential risk of not implementing the recommendation. - Possible values include: 'Error', 'Warning', 'None' - :type risk: str or ~azure.mgmt.advisor.models.Risk - :param short_description: A summary of the recommendation. - :type short_description: ~azure.mgmt.advisor.models.ShortDescription - :param suppression_ids: The list of snoozed and dismissed rules for the - recommendation. - :type suppression_ids: list[str] - :param extended_properties: Extended properties - :type extended_properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'impact': {'key': 'properties.impact', 'type': 'str'}, - 'impacted_field': {'key': 'properties.impactedField', 'type': 'str'}, - 'impacted_value': {'key': 'properties.impactedValue', 'type': 'str'}, - 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': '{object}'}, - 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, - 'risk': {'key': 'properties.risk', 'type': 'str'}, - 'short_description': {'key': 'properties.shortDescription', 'type': 'ShortDescription'}, - 'suppression_ids': {'key': 'properties.suppressionIds', 'type': '[str]'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ResourceRecommendationBase, self).__init__(**kwargs) - self.category = kwargs.get('category', None) - self.impact = kwargs.get('impact', None) - self.impacted_field = kwargs.get('impacted_field', None) - self.impacted_value = kwargs.get('impacted_value', None) - self.last_updated = kwargs.get('last_updated', None) - self.metadata = kwargs.get('metadata', None) - self.recommendation_type_id = kwargs.get('recommendation_type_id', None) - self.risk = kwargs.get('risk', None) - self.short_description = kwargs.get('short_description', None) - self.suppression_ids = kwargs.get('suppression_ids', None) - self.extended_properties = kwargs.get('extended_properties', None) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_recommendation_base_paged.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_recommendation_base_paged.py deleted file mode 100644 index ec44de265533..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_recommendation_base_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ResourceRecommendationBasePaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceRecommendationBase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceRecommendationBase]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceRecommendationBasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_recommendation_base_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_recommendation_base_py3.py deleted file mode 100644 index 39bfd16bafef..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/resource_recommendation_base_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ResourceRecommendationBase(Resource): - """Advisor Recommendation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource ID. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param category: The category of the recommendation. Possible values - include: 'HighAvailability', 'Security', 'Performance', 'Cost' - :type category: str or ~azure.mgmt.advisor.models.Category - :param impact: The business impact of the recommendation. Possible values - include: 'High', 'Medium', 'Low' - :type impact: str or ~azure.mgmt.advisor.models.Impact - :param impacted_field: The resource type identified by Advisor. - :type impacted_field: str - :param impacted_value: The resource identified by Advisor. - :type impacted_value: str - :param last_updated: The most recent time that Advisor checked the - validity of the recommendation. - :type last_updated: datetime - :param metadata: The recommendation metadata. - :type metadata: dict[str, object] - :param recommendation_type_id: The recommendation-type GUID. - :type recommendation_type_id: str - :param risk: The potential risk of not implementing the recommendation. - Possible values include: 'Error', 'Warning', 'None' - :type risk: str or ~azure.mgmt.advisor.models.Risk - :param short_description: A summary of the recommendation. - :type short_description: ~azure.mgmt.advisor.models.ShortDescription - :param suppression_ids: The list of snoozed and dismissed rules for the - recommendation. - :type suppression_ids: list[str] - :param extended_properties: Extended properties - :type extended_properties: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'impact': {'key': 'properties.impact', 'type': 'str'}, - 'impacted_field': {'key': 'properties.impactedField', 'type': 'str'}, - 'impacted_value': {'key': 'properties.impactedValue', 'type': 'str'}, - 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': '{object}'}, - 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, - 'risk': {'key': 'properties.risk', 'type': 'str'}, - 'short_description': {'key': 'properties.shortDescription', 'type': 'ShortDescription'}, - 'suppression_ids': {'key': 'properties.suppressionIds', 'type': '[str]'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, - } - - def __init__(self, *, category=None, impact=None, impacted_field: str=None, impacted_value: str=None, last_updated=None, metadata=None, recommendation_type_id: str=None, risk=None, short_description=None, suppression_ids=None, extended_properties=None, **kwargs) -> None: - super(ResourceRecommendationBase, self).__init__(**kwargs) - self.category = category - self.impact = impact - self.impacted_field = impacted_field - self.impacted_value = impacted_value - self.last_updated = last_updated - self.metadata = metadata - self.recommendation_type_id = recommendation_type_id - self.risk = risk - self.short_description = short_description - self.suppression_ids = suppression_ids - self.extended_properties = extended_properties diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/short_description.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/short_description.py deleted file mode 100644 index f2c722033a30..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/short_description.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShortDescription(Model): - """A summary of the recommendation. - - :param problem: The issue or opportunity identified by the recommendation. - :type problem: str - :param solution: The remediation action suggested by the recommendation. - :type solution: str - """ - - _attribute_map = { - 'problem': {'key': 'problem', 'type': 'str'}, - 'solution': {'key': 'solution', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ShortDescription, self).__init__(**kwargs) - self.problem = kwargs.get('problem', None) - self.solution = kwargs.get('solution', None) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/short_description_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/short_description_py3.py deleted file mode 100644 index ed3b7bd29aa2..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/short_description_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ShortDescription(Model): - """A summary of the recommendation. - - :param problem: The issue or opportunity identified by the recommendation. - :type problem: str - :param solution: The remediation action suggested by the recommendation. - :type solution: str - """ - - _attribute_map = { - 'problem': {'key': 'problem', 'type': 'str'}, - 'solution': {'key': 'solution', 'type': 'str'}, - } - - def __init__(self, *, problem: str=None, solution: str=None, **kwargs) -> None: - super(ShortDescription, self).__init__(**kwargs) - self.problem = problem - self.solution = solution diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/suppression_contract.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/suppression_contract.py deleted file mode 100644 index ff9cc1012dbd..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/suppression_contract.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SuppressionContract(Resource): - """The details of the snoozed or dismissed rule; for example, the duration, - name, and GUID associated with the rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource ID. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param suppression_id: The GUID of the suppression. - :type suppression_id: str - :param ttl: The duration for which the suppression is valid. - :type ttl: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'suppression_id': {'key': 'properties.suppressionId', 'type': 'str'}, - 'ttl': {'key': 'properties.ttl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SuppressionContract, self).__init__(**kwargs) - self.suppression_id = kwargs.get('suppression_id', None) - self.ttl = kwargs.get('ttl', None) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/suppression_contract_paged.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/suppression_contract_paged.py deleted file mode 100644 index 3ffc6c7f9a72..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/suppression_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SuppressionContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`SuppressionContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SuppressionContract]'} - } - - def __init__(self, *args, **kwargs): - - super(SuppressionContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/suppression_contract_py3.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/suppression_contract_py3.py deleted file mode 100644 index de2985eea108..000000000000 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/suppression_contract_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SuppressionContract(Resource): - """The details of the snoozed or dismissed rule; for example, the duration, - name, and GUID associated with the rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource ID. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param suppression_id: The GUID of the suppression. - :type suppression_id: str - :param ttl: The duration for which the suppression is valid. - :type ttl: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'suppression_id': {'key': 'properties.suppressionId', 'type': 'str'}, - 'ttl': {'key': 'properties.ttl', 'type': 'str'}, - } - - def __init__(self, *, suppression_id: str=None, ttl: str=None, **kwargs) -> None: - super(SuppressionContract, self).__init__(**kwargs) - self.suppression_id = suppression_id - self.ttl = ttl diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/__init__.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/__init__.py index 35b2918d8c2b..072a0fde46ec 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/__init__.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/__init__.py @@ -9,12 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from .configurations_operations import ConfigurationsOperations -from .recommendations_operations import RecommendationsOperations -from .operations import Operations -from .suppressions_operations import SuppressionsOperations +from ._recommendation_metadata_operations import RecommendationMetadataOperations +from ._configurations_operations import ConfigurationsOperations +from ._recommendations_operations import RecommendationsOperations +from ._operations import Operations +from ._suppressions_operations import SuppressionsOperations __all__ = [ + 'RecommendationMetadataOperations', 'ConfigurationsOperations', 'RecommendationsOperations', 'Operations', diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/configurations_operations.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_configurations_operations.py similarity index 95% rename from sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/configurations_operations.py rename to sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_configurations_operations.py index 93978f2d8cbe..128d558b5a7c 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/configurations_operations.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_configurations_operations.py @@ -19,6 +19,8 @@ class ConfigurationsOperations(object): """ConfigurationsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,8 +56,7 @@ def list_by_subscription( ~azure.mgmt.advisor.models.ConfigDataPaged[~azure.mgmt.advisor.models.ConfigData] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -84,6 +85,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -94,12 +100,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ConfigDataPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ConfigDataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ConfigDataPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations'} @@ -159,7 +163,6 @@ def create_in_subscription( raise exp deserialized = None - if response.status_code == 400: deserialized = self._deserialize('ARMErrorResponseBody', response) @@ -186,8 +189,7 @@ def list_by_resource_group( ~azure.mgmt.advisor.models.ConfigDataPaged[~azure.mgmt.advisor.models.ConfigData] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -217,6 +219,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -227,12 +234,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ConfigDataPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ConfigDataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ConfigDataPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations'} @@ -292,7 +297,6 @@ def create_in_resource_group( raise exp deserialized = None - if response.status_code == 400: deserialized = self._deserialize('ARMErrorResponseBody', response) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/operations.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_operations.py similarity index 90% rename from sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/operations.py rename to sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_operations.py index 25ba76f97f97..cb591080f43f 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/operations.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.advisor.models.OperationEntityPaged[~azure.mgmt.advisor.models.OperationEntity] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationEntityPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationEntityPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationEntityPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Advisor/operations'} diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_recommendation_metadata_operations.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_recommendation_metadata_operations.py new file mode 100644 index 000000000000..cbc259216fdc --- /dev/null +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_recommendation_metadata_operations.py @@ -0,0 +1,160 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RecommendationMetadataOperations(object): + """RecommendationMetadataOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2017-04-19". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-19" + + self.config = config + + def get( + self, name, custom_headers=None, raw=False, **operation_config): + """Gets the metadata entity. + + :param name: Name of metadata entity. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetadataEntity', response) + if response.status_code == 404: + deserialized = self._deserialize('ARMErrorResponseBody', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Advisor/metadata/{name}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of metadata entities. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MetadataEntity + :rtype: + ~azure.mgmt.advisor.models.MetadataEntityPaged[~azure.mgmt.advisor.models.MetadataEntity] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MetadataEntityPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Advisor/metadata'} diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/recommendations_operations.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_recommendations_operations.py similarity index 97% rename from sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/recommendations_operations.py rename to sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_recommendations_operations.py index 7eb288b64270..5f3bf5c6c6d6 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/recommendations_operations.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_recommendations_operations.py @@ -19,6 +19,8 @@ class RecommendationsOperations(object): """RecommendationsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -167,8 +169,7 @@ def list( ~azure.mgmt.advisor.models.ResourceRecommendationBasePaged[~azure.mgmt.advisor.models.ResourceRecommendationBase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -203,6 +204,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -213,12 +219,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ResourceRecommendationBasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ResourceRecommendationBasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ResourceRecommendationBasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/recommendations'} @@ -274,7 +278,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ResourceRecommendationBase', response) diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/suppressions_operations.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_suppressions_operations.py similarity index 97% rename from sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/suppressions_operations.py rename to sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_suppressions_operations.py index e9bdb9853ff6..6e2b52a75025 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/suppressions_operations.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_suppressions_operations.py @@ -19,6 +19,8 @@ class SuppressionsOperations(object): """SuppressionsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -91,7 +93,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SuppressionContract', response) @@ -169,7 +170,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SuppressionContract', response) @@ -260,8 +260,7 @@ def list( ~azure.mgmt.advisor.models.SuppressionContractPaged[~azure.mgmt.advisor.models.SuppressionContract] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -294,6 +293,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -304,12 +308,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SuppressionContractPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SuppressionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SuppressionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/suppressions'} diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/version.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/version.py index cb253c7db0b2..69dfaa9ef877 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/version.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/version.py @@ -9,5 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.1" - +VERSION = "3.0.0" diff --git a/sdk/advisor/azure-mgmt-advisor/setup.py b/sdk/advisor/azure-mgmt-advisor/setup.py index 892634c0a828..c4686dc338f5 100644 --- a/sdk/advisor/azure-mgmt-advisor/setup.py +++ b/sdk/advisor/azure-mgmt-advisor/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',