diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/__init__.py index 9aa3b679e73c..08f6c3faab21 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .maria_db_management_client import MariaDBManagementClient -from .version import VERSION +from ._configuration import MariaDBManagementClientConfiguration +from ._maria_db_management_client import MariaDBManagementClient +__all__ = ['MariaDBManagementClient', 'MariaDBManagementClientConfiguration'] -__all__ = ['MariaDBManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_configuration.py new file mode 100644 index 000000000000..ae736f37839a --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_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 MariaDBManagementClientConfiguration(AzureConfiguration): + """Configuration for MariaDBManagementClient + 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 ID of the target subscription. + :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(MariaDBManagementClientConfiguration, 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-rdbms/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_maria_db_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_maria_db_management_client.py new file mode 100644 index 000000000000..630e5446cf31 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_maria_db_management_client.py @@ -0,0 +1,145 @@ +# 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.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import MariaDBManagementClientConfiguration +from .operations import MariaDBManagementClientOperationsMixin +from .operations import ServersOperations +from .operations import ReplicasOperations +from .operations import FirewallRulesOperations +from .operations import VirtualNetworkRulesOperations +from .operations import DatabasesOperations +from .operations import ConfigurationsOperations +from .operations import LogFilesOperations +from .operations import LocationBasedPerformanceTierOperations +from .operations import CheckNameAvailabilityOperations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import Operations +from .operations import QueryTextsOperations +from .operations import TopQueryStatisticsOperations +from .operations import WaitStatisticsOperations +from .operations import AdvisorsOperations +from .operations import RecommendedActionsOperations +from .operations import LocationBasedRecommendedActionSessionsOperationStatusOperations +from .operations import LocationBasedRecommendedActionSessionsResultOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from . import models + + +class MariaDBManagementClient(MariaDBManagementClientOperationsMixin, SDKClient): + """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. + + :ivar config: Configuration for client. + :vartype config: MariaDBManagementClientConfiguration + + :ivar servers: Servers operations + :vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations + :ivar replicas: Replicas operations + :vartype replicas: azure.mgmt.rdbms.mariadb.operations.ReplicasOperations + :ivar firewall_rules: FirewallRules operations + :vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRules operations + :vartype virtual_network_rules: azure.mgmt.rdbms.mariadb.operations.VirtualNetworkRulesOperations + :ivar databases: Databases operations + :vartype databases: azure.mgmt.rdbms.mariadb.operations.DatabasesOperations + :ivar configurations: Configurations operations + :vartype configurations: azure.mgmt.rdbms.mariadb.operations.ConfigurationsOperations + :ivar log_files: LogFiles operations + :vartype log_files: azure.mgmt.rdbms.mariadb.operations.LogFilesOperations + :ivar location_based_performance_tier: LocationBasedPerformanceTier operations + :vartype location_based_performance_tier: azure.mgmt.rdbms.mariadb.operations.LocationBasedPerformanceTierOperations + :ivar check_name_availability: CheckNameAvailability operations + :vartype check_name_availability: azure.mgmt.rdbms.mariadb.operations.CheckNameAvailabilityOperations + :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations + :vartype server_security_alert_policies: azure.mgmt.rdbms.mariadb.operations.ServerSecurityAlertPoliciesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.rdbms.mariadb.operations.Operations + :ivar query_texts: QueryTexts operations + :vartype query_texts: azure.mgmt.rdbms.mariadb.operations.QueryTextsOperations + :ivar top_query_statistics: TopQueryStatistics operations + :vartype top_query_statistics: azure.mgmt.rdbms.mariadb.operations.TopQueryStatisticsOperations + :ivar wait_statistics: WaitStatistics operations + :vartype wait_statistics: azure.mgmt.rdbms.mariadb.operations.WaitStatisticsOperations + :ivar advisors: Advisors operations + :vartype advisors: azure.mgmt.rdbms.mariadb.operations.AdvisorsOperations + :ivar recommended_actions: RecommendedActions operations + :vartype recommended_actions: azure.mgmt.rdbms.mariadb.operations.RecommendedActionsOperations + :ivar location_based_recommended_action_sessions_operation_status: LocationBasedRecommendedActionSessionsOperationStatus operations + :vartype location_based_recommended_action_sessions_operation_status: azure.mgmt.rdbms.mariadb.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations + :ivar location_based_recommended_action_sessions_result: LocationBasedRecommendedActionSessionsResult operations + :vartype location_based_recommended_action_sessions_result: azure.mgmt.rdbms.mariadb.operations.LocationBasedRecommendedActionSessionsResultOperations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.rdbms.mariadb.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.rdbms.mariadb.operations.PrivateLinkResourcesOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = MariaDBManagementClientConfiguration(credentials, subscription_id, base_url) + super(MariaDBManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-06-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.servers = ServersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.replicas = ReplicasOperations( + self._client, self.config, self._serialize, self._deserialize) + self.firewall_rules = FirewallRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.configurations = ConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.log_files = LogFilesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.location_based_performance_tier = LocationBasedPerformanceTierOperations( + self._client, self.config, self._serialize, self._deserialize) + self.check_name_availability = CheckNameAvailabilityOperations( + self._client, self.config, self._serialize, self._deserialize) + self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.query_texts = QueryTextsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.top_query_statistics = TopQueryStatisticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.wait_statistics = WaitStatisticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.advisors = AdvisorsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.recommended_actions = RecommendedActionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.location_based_recommended_action_sessions_operation_status = LocationBasedRecommendedActionSessionsOperationStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.location_based_recommended_action_sessions_result = LocationBasedRecommendedActionSessionsResultOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/maria_db_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/maria_db_management_client.py deleted file mode 100644 index bbdf327bd76e..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/maria_db_management_client.py +++ /dev/null @@ -1,133 +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.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.servers_operations import ServersOperations -from .operations.replicas_operations import ReplicasOperations -from .operations.firewall_rules_operations import FirewallRulesOperations -from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations -from .operations.databases_operations import DatabasesOperations -from .operations.configurations_operations import ConfigurationsOperations -from .operations.log_files_operations import LogFilesOperations -from .operations.location_based_performance_tier_operations import LocationBasedPerformanceTierOperations -from .operations.check_name_availability_operations import CheckNameAvailabilityOperations -from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations.operations import Operations -from . import models - - -class MariaDBManagementClientConfiguration(AzureConfiguration): - """Configuration for MariaDBManagementClient - 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 subscription ID that identifies an Azure - subscription. - :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(MariaDBManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class MariaDBManagementClient(SDKClient): - """MariaDB Client - - :ivar config: Configuration for client. - :vartype config: MariaDBManagementClientConfiguration - - :ivar servers: Servers operations - :vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations - :ivar replicas: Replicas operations - :vartype replicas: azure.mgmt.rdbms.mariadb.operations.ReplicasOperations - :ivar firewall_rules: FirewallRules operations - :vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations - :ivar virtual_network_rules: VirtualNetworkRules operations - :vartype virtual_network_rules: azure.mgmt.rdbms.mariadb.operations.VirtualNetworkRulesOperations - :ivar databases: Databases operations - :vartype databases: azure.mgmt.rdbms.mariadb.operations.DatabasesOperations - :ivar configurations: Configurations operations - :vartype configurations: azure.mgmt.rdbms.mariadb.operations.ConfigurationsOperations - :ivar log_files: LogFiles operations - :vartype log_files: azure.mgmt.rdbms.mariadb.operations.LogFilesOperations - :ivar location_based_performance_tier: LocationBasedPerformanceTier operations - :vartype location_based_performance_tier: azure.mgmt.rdbms.mariadb.operations.LocationBasedPerformanceTierOperations - :ivar check_name_availability: CheckNameAvailability operations - :vartype check_name_availability: azure.mgmt.rdbms.mariadb.operations.CheckNameAvailabilityOperations - :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.mariadb.operations.ServerSecurityAlertPoliciesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.mariadb.operations.Operations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription ID that identifies an Azure - subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = MariaDBManagementClientConfiguration(credentials, subscription_id, base_url) - super(MariaDBManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-06-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.replicas = ReplicasOperations( - self._client, self.config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.virtual_network_rules = VirtualNetworkRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.log_files = LogFilesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location_based_performance_tier = LocationBasedPerformanceTierOperations( - self._client, self.config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self.config, self._serialize, self._deserialize) - self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py index b5fb08027522..70047606cb69 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py @@ -10,65 +10,110 @@ # -------------------------------------------------------------------------- try: - from .proxy_resource_py3 import ProxyResource - from .tracked_resource_py3 import TrackedResource - from .storage_profile_py3 import StorageProfile - from .server_properties_for_create_py3 import ServerPropertiesForCreate - from .server_properties_for_default_create_py3 import ServerPropertiesForDefaultCreate - from .server_properties_for_restore_py3 import ServerPropertiesForRestore - from .server_properties_for_geo_restore_py3 import ServerPropertiesForGeoRestore - from .server_properties_for_replica_py3 import ServerPropertiesForReplica - from .sku_py3 import Sku - from .server_py3 import Server - from .server_for_create_py3 import ServerForCreate - from .server_update_parameters_py3 import ServerUpdateParameters - from .firewall_rule_py3 import FirewallRule - from .virtual_network_rule_py3 import VirtualNetworkRule - from .database_py3 import Database - from .configuration_py3 import Configuration - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .operation_list_result_py3 import OperationListResult - from .log_file_py3 import LogFile - from .performance_tier_service_level_objectives_py3 import PerformanceTierServiceLevelObjectives - from .performance_tier_properties_py3 import PerformanceTierProperties - from .name_availability_request_py3 import NameAvailabilityRequest - from .name_availability_py3 import NameAvailability - from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy + from ._models_py3 import Advisor + from ._models_py3 import AzureEntityResource + from ._models_py3 import Configuration + from ._models_py3 import Database + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorResponse + from ._models_py3 import FirewallRule + from ._models_py3 import LogFile + from ._models_py3 import NameAvailability + from ._models_py3 import NameAvailabilityRequest + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult + from ._models_py3 import PerformanceTierProperties + from ._models_py3 import PerformanceTierServiceLevelObjectives + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointProperty + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceProperties + from ._models_py3 import PrivateLinkServiceConnectionStateProperty + from ._models_py3 import ProxyResource + from ._models_py3 import QueryStatistic + from ._models_py3 import QueryText + from ._models_py3 import RecommendationAction + from ._models_py3 import RecommendationActionsResultList + from ._models_py3 import RecommendedActionSessionsOperationStatus + from ._models_py3 import Resource + from ._models_py3 import Server + from ._models_py3 import ServerForCreate + from ._models_py3 import ServerPropertiesForCreate + from ._models_py3 import ServerPropertiesForDefaultCreate + from ._models_py3 import ServerPropertiesForGeoRestore + from ._models_py3 import ServerPropertiesForReplica + from ._models_py3 import ServerPropertiesForRestore + from ._models_py3 import ServerSecurityAlertPolicy + from ._models_py3 import ServerUpdateParameters + from ._models_py3 import Sku + from ._models_py3 import StorageProfile + from ._models_py3 import TagsObject + from ._models_py3 import TopQueryStatisticsInput + from ._models_py3 import TrackedResource + from ._models_py3 import VirtualNetworkRule + from ._models_py3 import WaitStatistic + from ._models_py3 import WaitStatisticsInput except (SyntaxError, ImportError): - from .proxy_resource import ProxyResource - from .tracked_resource import TrackedResource - from .storage_profile import StorageProfile - from .server_properties_for_create import ServerPropertiesForCreate - from .server_properties_for_default_create import ServerPropertiesForDefaultCreate - from .server_properties_for_restore import ServerPropertiesForRestore - from .server_properties_for_geo_restore import ServerPropertiesForGeoRestore - from .server_properties_for_replica import ServerPropertiesForReplica - from .sku import Sku - from .server import Server - from .server_for_create import ServerForCreate - from .server_update_parameters import ServerUpdateParameters - from .firewall_rule import FirewallRule - from .virtual_network_rule import VirtualNetworkRule - from .database import Database - from .configuration import Configuration - from .operation_display import OperationDisplay - from .operation import Operation - from .operation_list_result import OperationListResult - from .log_file import LogFile - from .performance_tier_service_level_objectives import PerformanceTierServiceLevelObjectives - from .performance_tier_properties import PerformanceTierProperties - from .name_availability_request import NameAvailabilityRequest - from .name_availability import NameAvailability - from .server_security_alert_policy import ServerSecurityAlertPolicy -from .server_paged import ServerPaged -from .firewall_rule_paged import FirewallRulePaged -from .virtual_network_rule_paged import VirtualNetworkRulePaged -from .database_paged import DatabasePaged -from .configuration_paged import ConfigurationPaged -from .log_file_paged import LogFilePaged -from .performance_tier_properties_paged import PerformanceTierPropertiesPaged -from .maria_db_management_client_enums import ( + from ._models import Advisor + from ._models import AzureEntityResource + from ._models import Configuration + from ._models import Database + from ._models import ErrorAdditionalInfo + from ._models import ErrorResponse + from ._models import FirewallRule + from ._models import LogFile + from ._models import NameAvailability + from ._models import NameAvailabilityRequest + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationListResult + from ._models import PerformanceTierProperties + from ._models import PerformanceTierServiceLevelObjectives + from ._models import PrivateEndpointConnection + from ._models import PrivateEndpointProperty + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceProperties + from ._models import PrivateLinkServiceConnectionStateProperty + from ._models import ProxyResource + from ._models import QueryStatistic + from ._models import QueryText + from ._models import RecommendationAction + from ._models import RecommendationActionsResultList + from ._models import RecommendedActionSessionsOperationStatus + from ._models import Resource + from ._models import Server + from ._models import ServerForCreate + from ._models import ServerPropertiesForCreate + from ._models import ServerPropertiesForDefaultCreate + from ._models import ServerPropertiesForGeoRestore + from ._models import ServerPropertiesForReplica + from ._models import ServerPropertiesForRestore + from ._models import ServerSecurityAlertPolicy + from ._models import ServerUpdateParameters + from ._models import Sku + from ._models import StorageProfile + from ._models import TagsObject + from ._models import TopQueryStatisticsInput + from ._models import TrackedResource + from ._models import VirtualNetworkRule + from ._models import WaitStatistic + from ._models import WaitStatisticsInput +from ._paged_models import AdvisorPaged +from ._paged_models import ConfigurationPaged +from ._paged_models import DatabasePaged +from ._paged_models import FirewallRulePaged +from ._paged_models import LogFilePaged +from ._paged_models import PerformanceTierPropertiesPaged +from ._paged_models import PrivateEndpointConnectionPaged +from ._paged_models import PrivateLinkResourcePaged +from ._paged_models import QueryStatisticPaged +from ._paged_models import QueryTextPaged +from ._paged_models import RecommendationActionPaged +from ._paged_models import ServerPaged +from ._paged_models import VirtualNetworkRulePaged +from ._paged_models import WaitStatisticPaged +from ._maria_db_management_client_enums import ( ServerVersion, SslEnforcementEnum, ServerState, @@ -81,31 +126,50 @@ ) __all__ = [ + 'Advisor', + 'AzureEntityResource', + 'Configuration', + 'Database', + 'ErrorAdditionalInfo', + 'ErrorResponse', + 'FirewallRule', + 'LogFile', + 'NameAvailability', + 'NameAvailabilityRequest', + 'Operation', + 'OperationDisplay', + 'OperationListResult', + 'PerformanceTierProperties', + 'PerformanceTierServiceLevelObjectives', + 'PrivateEndpointConnection', + 'PrivateEndpointProperty', + 'PrivateLinkResource', + 'PrivateLinkResourceProperties', + 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', - 'TrackedResource', - 'StorageProfile', + 'QueryStatistic', + 'QueryText', + 'RecommendationAction', + 'RecommendationActionsResultList', + 'RecommendedActionSessionsOperationStatus', + 'Resource', + 'Server', + 'ServerForCreate', 'ServerPropertiesForCreate', 'ServerPropertiesForDefaultCreate', - 'ServerPropertiesForRestore', 'ServerPropertiesForGeoRestore', 'ServerPropertiesForReplica', - 'Sku', - 'Server', - 'ServerForCreate', + 'ServerPropertiesForRestore', + 'ServerSecurityAlertPolicy', 'ServerUpdateParameters', - 'FirewallRule', + 'Sku', + 'StorageProfile', + 'TagsObject', + 'TopQueryStatisticsInput', + 'TrackedResource', 'VirtualNetworkRule', - 'Database', - 'Configuration', - 'OperationDisplay', - 'Operation', - 'OperationListResult', - 'LogFile', - 'PerformanceTierServiceLevelObjectives', - 'PerformanceTierProperties', - 'NameAvailabilityRequest', - 'NameAvailability', - 'ServerSecurityAlertPolicy', + 'WaitStatistic', + 'WaitStatisticsInput', 'ServerPaged', 'FirewallRulePaged', 'VirtualNetworkRulePaged', @@ -113,6 +177,13 @@ 'ConfigurationPaged', 'LogFilePaged', 'PerformanceTierPropertiesPaged', + 'QueryTextPaged', + 'QueryStatisticPaged', + 'WaitStatisticPaged', + 'AdvisorPaged', + 'RecommendationActionPaged', + 'PrivateEndpointConnectionPaged', + 'PrivateLinkResourcePaged', 'ServerVersion', 'SslEnforcementEnum', 'ServerState', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/maria_db_management_client_enums.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/maria_db_management_client_enums.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py new file mode 100644 index 000000000000..5ac3699b3022 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py @@ -0,0 +1,1861 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :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 ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :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(ProxyResource, self).__init__(**kwargs) + + +class Advisor(ProxyResource): + """Represents a recommendation action advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: The properties of a recommendation action advisor. + :type properties: object + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Advisor, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.rdbms.mariadb.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class Configuration(ProxyResource): + """Represents a Configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param value: Value of the configuration. + :type value: str + :ivar description: Description of the configuration. + :vartype description: str + :ivar default_value: Default value of the configuration. + :vartype default_value: str + :ivar data_type: Data type of the configuration. + :vartype data_type: str + :ivar allowed_values: Allowed values of the configuration. + :vartype allowed_values: str + :param source: Source of the configuration. + :type source: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'default_value': {'readonly': True}, + 'data_type': {'readonly': True}, + 'allowed_values': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, + 'data_type': {'key': 'properties.dataType', 'type': 'str'}, + 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Configuration, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.description = None + self.default_value = None + self.data_type = None + self.allowed_values = None + self.source = kwargs.get('source', None) + + +class Database(ProxyResource): + """Represents a Database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param charset: The charset of the database. + :type charset: str + :param collation: The collation of the database. + :type collation: 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'}, + 'charset': {'key': 'properties.charset', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Database, self).__init__(**kwargs) + self.charset = kwargs.get('charset', None) + self.collation = kwargs.get('collation', None) + + +class ErrorAdditionalInfo(Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorResponse(Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.rdbms.mariadb.models.ErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.rdbms.mariadb.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param start_ip_address: Required. The start IP address of the server + firewall rule. Must be IPv4 format. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the server firewall + rule. Must be IPv4 format. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, + 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FirewallRule, self).__init__(**kwargs) + self.start_ip_address = kwargs.get('start_ip_address', None) + self.end_ip_address = kwargs.get('end_ip_address', None) + + +class LogFile(ProxyResource): + """Represents a log file. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param size_in_kb: Size of the log file. + :type size_in_kb: long + :ivar created_time: Creation timestamp of the log file. + :vartype created_time: datetime + :ivar last_modified_time: Last modified timestamp of the log file. + :vartype last_modified_time: datetime + :param log_file_type: Type of the log file. + :type log_file_type: str + :ivar url: The url to download the log file from. + :vartype url: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'log_file_type': {'key': 'properties.type', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogFile, self).__init__(**kwargs) + self.size_in_kb = kwargs.get('size_in_kb', None) + self.created_time = None + self.last_modified_time = None + self.log_file_type = kwargs.get('log_file_type', None) + self.url = None + + +class NameAvailability(Model): + """Represents a resource name availability. + + :param message: Error Message. + :type message: str + :param name_available: Indicates whether the resource name is available. + :type name_available: bool + :param reason: Reason for name being unavailable. + :type reason: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameAvailability, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + + +class NameAvailabilityRequest(Model): + """Request from client to check resource name availability. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource name to verify. + :type name: str + :param type: Resource type used for verification. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class Operation(Model): + """REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation or action. + :vartype display: ~azure.mgmt.rdbms.mariadb.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'NotSpecified', 'user', 'system' + :vartype origin: str or ~azure.mgmt.rdbms.mariadb.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Operation resource provider name. + :vartype provider: str + :ivar resource: Resource on which the operation is performed. + :vartype resource: str + :ivar operation: Localized friendly name for the operation. + :vartype operation: str + :ivar description: Operation description. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationListResult(Model): + """A list of resource provider operations. + + :param value: The list of resource provider operations. + :type value: list[~azure.mgmt.rdbms.mariadb.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, **kwargs): + super(OperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PerformanceTierProperties(Model): + """Performance tier properties. + + :param id: ID of the performance tier. + :type id: str + :param service_level_objectives: Service level objectives associated with + the performance tier + :type service_level_objectives: + list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierServiceLevelObjectives] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, + } + + def __init__(self, **kwargs): + super(PerformanceTierProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.service_level_objectives = kwargs.get('service_level_objectives', None) + + +class PerformanceTierServiceLevelObjectives(Model): + """Service level objectives for performance tier. + + :param id: ID for the service level objective. + :type id: str + :param edition: Edition of the performance tier. + :type edition: str + :param v_core: vCore associated with the service level objective + :type v_core: int + :param hardware_generation: Hardware generation associated with the + service level objective + :type hardware_generation: str + :param max_backup_retention_days: Maximum Backup retention in days for the + performance tier edition + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the + performance tier edition + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'v_core': {'key': 'vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.edition = kwargs.get('edition', None) + self.v_core = kwargs.get('v_core', None) + self.hardware_generation = kwargs.get('hardware_generation', None) + self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) + self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) + self.max_storage_mb = kwargs.get('max_storage_mb', None) + self.min_storage_mb = kwargs.get('min_storage_mb', None) + + +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param private_endpoint: Private endpoint which the connection belongs to. + :type private_endpoint: + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateProperty + :ivar provisioning_state: State of the private endpoint connection. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + + +class PrivateEndpointProperty(Model): + """PrivateEndpointProperty. + + :param id: Resource id of the private endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointProperty, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateLinkResource(ProxyResource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar properties: The private link resource group id. + :vartype properties: + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = None + + +class PrivateLinkResourceProperties(Model): + """Properties of a private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + + +class PrivateLinkServiceConnectionStateProperty(Model): + """PrivateLinkServiceConnectionStateProperty. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. The private link service connection status. + :type status: str + :param description: Required. The private link service connection + description. + :type description: str + :ivar actions_required: The actions required for private link service + connection. + :vartype actions_required: str + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = None + + +class QueryStatistic(ProxyResource): + """Represents a Query Statistic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param query_id: Database query identifier. + :type query_id: str + :param start_time: Observation start time. + :type start_time: datetime + :param end_time: Observation end time. + :type end_time: datetime + :param aggregation_function: Aggregation function name. + :type aggregation_function: str + :param database_names: The list of database names. + :type database_names: list[str] + :param query_execution_count: Number of query executions in this time + interval. + :type query_execution_count: long + :param metric_name: Metric name. + :type metric_name: str + :param metric_display_name: Metric display name. + :type metric_display_name: str + :param metric_value: Metric value. + :type metric_value: float + :param metric_value_unit: Metric value unit. + :type metric_value_unit: 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'}, + 'query_id': {'key': 'properties.queryId', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, + 'database_names': {'key': 'properties.databaseNames', 'type': '[str]'}, + 'query_execution_count': {'key': 'properties.queryExecutionCount', 'type': 'long'}, + 'metric_name': {'key': 'properties.metricName', 'type': 'str'}, + 'metric_display_name': {'key': 'properties.metricDisplayName', 'type': 'str'}, + 'metric_value': {'key': 'properties.metricValue', 'type': 'float'}, + 'metric_value_unit': {'key': 'properties.metricValueUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryStatistic, self).__init__(**kwargs) + self.query_id = kwargs.get('query_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.aggregation_function = kwargs.get('aggregation_function', None) + self.database_names = kwargs.get('database_names', None) + self.query_execution_count = kwargs.get('query_execution_count', None) + self.metric_name = kwargs.get('metric_name', None) + self.metric_display_name = kwargs.get('metric_display_name', None) + self.metric_value = kwargs.get('metric_value', None) + self.metric_value_unit = kwargs.get('metric_value_unit', None) + + +class QueryText(ProxyResource): + """Represents a Query Text. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param query_id: Query identifier unique to the server. + :type query_id: str + :param query_text: Query text. + :type query_text: 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'}, + 'query_id': {'key': 'properties.queryId', 'type': 'str'}, + 'query_text': {'key': 'properties.queryText', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryText, self).__init__(**kwargs) + self.query_id = kwargs.get('query_id', None) + self.query_text = kwargs.get('query_text', None) + + +class RecommendationAction(ProxyResource): + """Represents a Recommendation Action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param advisor_name: Advisor name. + :type advisor_name: str + :param session_id: Recommendation action session identifier. + :type session_id: str + :param action_id: Recommendation action identifier. + :type action_id: int + :param created_time: Recommendation action creation time. + :type created_time: datetime + :param expiration_time: Recommendation action expiration time. + :type expiration_time: datetime + :param reason: Recommendation action reason. + :type reason: str + :param recommendation_type: Recommendation action type. + :type recommendation_type: str + :param details: Recommendation action details. + :type details: 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'}, + 'advisor_name': {'key': 'properties.advisorName', 'type': 'str'}, + 'session_id': {'key': 'properties.sessionId', 'type': 'str'}, + 'action_id': {'key': 'properties.actionId', 'type': 'int'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'reason': {'key': 'properties.reason', 'type': 'str'}, + 'recommendation_type': {'key': 'properties.recommendationType', 'type': 'str'}, + 'details': {'key': 'properties.details', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(RecommendationAction, self).__init__(**kwargs) + self.advisor_name = kwargs.get('advisor_name', None) + self.session_id = kwargs.get('session_id', None) + self.action_id = kwargs.get('action_id', None) + self.created_time = kwargs.get('created_time', None) + self.expiration_time = kwargs.get('expiration_time', None) + self.reason = kwargs.get('reason', None) + self.recommendation_type = kwargs.get('recommendation_type', None) + self.details = kwargs.get('details', None) + + +class RecommendationActionsResultList(Model): + """A list of recommendation actions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of recommendation action advisors. + :vartype value: + list[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] + :ivar next_link: Link to retrieve next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RecommendationAction]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecommendationActionsResultList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class RecommendedActionSessionsOperationStatus(Model): + """Recommendation action session operation status. + + :param name: Operation identifier. + :type name: str + :param start_time: Operation start time. + :type start_time: datetime + :param status: Operation status. + :type status: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecommendedActionSessionsOperationStatus, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.start_time = kwargs.get('start_time', None) + self.status = kwargs.get('status', None) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class Server(TrackedResource): + """Represents a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku + :param administrator_login: The administrator's login name of a server. + Can only be specified when the server is being created (and is required + for creation). + :type administrator_login: str + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param user_visible_state: A state of a server that is visible to user. + Possible values include: 'Ready', 'Dropping', 'Disabled' + :type user_visible_state: str or + ~azure.mgmt.rdbms.mariadb.models.ServerState + :param fully_qualified_domain_name: The fully qualified domain name of a + server. + :type fully_qualified_domain_name: str + :param earliest_restore_date: Earliest restore point creation time + (ISO8601 format) + :type earliest_restore_date: datetime + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param replication_role: The replication role of the server. + :type replication_role: str + :param master_server_id: The master server id of a replica server. + :type master_server_id: str + :param replica_capacity: The maximum number of replicas that a master + server can have. + :type replica_capacity: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'replica_capacity': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, + 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Server, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.administrator_login = kwargs.get('administrator_login', None) + self.version = kwargs.get('version', None) + self.ssl_enforcement = kwargs.get('ssl_enforcement', None) + self.user_visible_state = kwargs.get('user_visible_state', None) + self.fully_qualified_domain_name = kwargs.get('fully_qualified_domain_name', None) + self.earliest_restore_date = kwargs.get('earliest_restore_date', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.replication_role = kwargs.get('replication_role', None) + self.master_server_id = kwargs.get('master_server_id', None) + self.replica_capacity = kwargs.get('replica_capacity', None) + + +class ServerForCreate(Model): + """Represents a server to be created. + + All required parameters must be populated in order to send to Azure. + + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku + :param properties: Required. Properties of the server. + :type properties: + ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate + :param location: Required. The location the resource resides in. + :type location: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _validation = { + 'properties': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ServerForCreate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.properties = kwargs.get('properties', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ServerPropertiesForCreate(Model): + """The properties used to create a new server. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServerPropertiesForDefaultCreate, + ServerPropertiesForRestore, ServerPropertiesForGeoRestore, + ServerPropertiesForReplica + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + """ + + _validation = { + 'create_mode': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + } + + _subtype_map = { + 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} + } + + def __init__(self, **kwargs): + super(ServerPropertiesForCreate, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.ssl_enforcement = kwargs.get('ssl_enforcement', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.create_mode = None + + +class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): + """The properties used to create a new server. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param administrator_login: Required. The administrator's login name of a + server. Can only be specified when the server is being created (and is + required for creation). + :type administrator_login: str + :param administrator_login_password: Required. The password of the + administrator login. + :type administrator_login_password: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerPropertiesForDefaultCreate, self).__init__(**kwargs) + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.create_mode = 'Default' + + +class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring to a different + region from a geo replicated backup. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param source_server_id: Required. The source server id to restore from. + :type source_server_id: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerPropertiesForGeoRestore, self).__init__(**kwargs) + self.source_server_id = kwargs.get('source_server_id', None) + self.create_mode = 'GeoRestore' + + +class ServerPropertiesForReplica(ServerPropertiesForCreate): + """The properties to create a new replica. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param source_server_id: Required. The master server id to create replica + from. + :type source_server_id: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerPropertiesForReplica, self).__init__(**kwargs) + self.source_server_id = kwargs.get('source_server_id', None) + self.create_mode = 'Replica' + + +class ServerPropertiesForRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring from a backup. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param source_server_id: Required. The source server id to restore from. + :type source_server_id: str + :param restore_point_in_time: Required. Restore point creation time + (ISO8601 format), specifying the time to restore from. + :type restore_point_in_time: datetime + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + 'restore_point_in_time': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerPropertiesForRestore, self).__init__(**kwargs) + self.source_server_id = kwargs.get('source_server_id', None) + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.create_mode = 'PointInTimeRestore' + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled. Possible values include: 'Enabled', 'Disabled' + :type state: str or + ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + + +class ServerUpdateParameters(Model): + """Parameters allowed to update for a server. + + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param administrator_login_password: The password of the administrator + login. + :type administrator_login_password: str + :param version: The version of a server. Possible values include: '5.6', + '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param replication_role: The replication role of the server. + :type replication_role: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ServerUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.version = kwargs.get('version', None) + self.ssl_enforcement = kwargs.get('ssl_enforcement', None) + self.replication_role = kwargs.get('replication_role', None) + self.tags = kwargs.get('tags', None) + + +class Sku(Model): + """Billing information related properties of a server. + + :param name: The name of the sku, typically, tier + family + cores, e.g. + B_Gen4_1, GP_Gen5_8. + :type name: str + :param tier: The tier of the particular SKU, e.g. Basic. Possible values + include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' + :type tier: str or ~azure.mgmt.rdbms.mariadb.models.SkuTier + :param capacity: The scale up/out capacity, representing server's compute + units. + :type capacity: int + :param size: The size code, to be interpreted by resource as appropriate. + :type size: str + :param family: The family of hardware. + :type family: str + """ + + _validation = { + 'capacity': {'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + + +class StorageProfile(Model): + """Storage Profile properties of a server. + + :param backup_retention_days: Backup retention days for the server. + :type backup_retention_days: int + :param geo_redundant_backup: Enable Geo-redundant or not for server + backup. Possible values include: 'Enabled', 'Disabled' + :type geo_redundant_backup: str or + ~azure.mgmt.rdbms.mariadb.models.GeoRedundantBackup + :param storage_mb: Max storage allowed for a server. + :type storage_mb: int + :param storage_autogrow: Enable Storage Auto Grow. Possible values + include: 'Enabled', 'Disabled' + :type storage_autogrow: str or + ~azure.mgmt.rdbms.mariadb.models.StorageAutogrow + """ + + _attribute_map = { + 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, + 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, + 'storage_mb': {'key': 'storageMB', 'type': 'int'}, + 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.backup_retention_days = kwargs.get('backup_retention_days', None) + self.geo_redundant_backup = kwargs.get('geo_redundant_backup', None) + self.storage_mb = kwargs.get('storage_mb', None) + self.storage_autogrow = kwargs.get('storage_autogrow', None) + + +class TagsObject(Model): + """Tags object for patch operations. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsObject, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class TopQueryStatisticsInput(Model): + """Input to get top query statistics. + + All required parameters must be populated in order to send to Azure. + + :param number_of_top_queries: Required. Max number of top queries to + return. + :type number_of_top_queries: int + :param aggregation_function: Required. Aggregation function name. + :type aggregation_function: str + :param observed_metric: Required. Observed metric name. + :type observed_metric: str + :param observation_start_time: Required. Observation start time. + :type observation_start_time: datetime + :param observation_end_time: Required. Observation end time. + :type observation_end_time: datetime + :param aggregation_window: Required. Aggregation interval type in ISO 8601 + format. + :type aggregation_window: str + """ + + _validation = { + 'number_of_top_queries': {'required': True}, + 'aggregation_function': {'required': True}, + 'observed_metric': {'required': True}, + 'observation_start_time': {'required': True}, + 'observation_end_time': {'required': True}, + 'aggregation_window': {'required': True}, + } + + _attribute_map = { + 'number_of_top_queries': {'key': 'properties.numberOfTopQueries', 'type': 'int'}, + 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, + 'observed_metric': {'key': 'properties.observedMetric', 'type': 'str'}, + 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, + 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, + 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TopQueryStatisticsInput, self).__init__(**kwargs) + self.number_of_top_queries = kwargs.get('number_of_top_queries', None) + self.aggregation_function = kwargs.get('aggregation_function', None) + self.observed_metric = kwargs.get('observed_metric', None) + self.observation_start_time = kwargs.get('observation_start_time', None) + self.observation_end_time = kwargs.get('observation_end_time', None) + self.aggregation_window = kwargs.get('aggregation_window', None) + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or + ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + self.state = None + + +class WaitStatistic(ProxyResource): + """Represents a Wait Statistic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param start_time: Observation start time. + :type start_time: datetime + :param end_time: Observation end time. + :type end_time: datetime + :param event_name: Wait event name. + :type event_name: str + :param event_type_name: Wait event type name. + :type event_type_name: str + :param query_id: Database query identifier. + :type query_id: long + :param database_name: Database Name. + :type database_name: str + :param user_id: Database user identifier. + :type user_id: long + :param count: Wait event count observed in this time interval. + :type count: long + :param total_time_in_ms: Total time of wait in milliseconds in this time + interval. + :type total_time_in_ms: float + """ + + _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'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'event_name': {'key': 'properties.eventName', 'type': 'str'}, + 'event_type_name': {'key': 'properties.eventTypeName', 'type': 'str'}, + 'query_id': {'key': 'properties.queryId', 'type': 'long'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'long'}, + 'count': {'key': 'properties.count', 'type': 'long'}, + 'total_time_in_ms': {'key': 'properties.totalTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(WaitStatistic, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.event_name = kwargs.get('event_name', None) + self.event_type_name = kwargs.get('event_type_name', None) + self.query_id = kwargs.get('query_id', None) + self.database_name = kwargs.get('database_name', None) + self.user_id = kwargs.get('user_id', None) + self.count = kwargs.get('count', None) + self.total_time_in_ms = kwargs.get('total_time_in_ms', None) + + +class WaitStatisticsInput(Model): + """Input to get wait statistics. + + All required parameters must be populated in order to send to Azure. + + :param observation_start_time: Required. Observation start time. + :type observation_start_time: datetime + :param observation_end_time: Required. Observation end time. + :type observation_end_time: datetime + :param aggregation_window: Required. Aggregation interval type in ISO 8601 + format. + :type aggregation_window: str + """ + + _validation = { + 'observation_start_time': {'required': True}, + 'observation_end_time': {'required': True}, + 'aggregation_window': {'required': True}, + } + + _attribute_map = { + 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, + 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, + 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitStatisticsInput, self).__init__(**kwargs) + self.observation_start_time = kwargs.get('observation_start_time', None) + self.observation_end_time = kwargs.get('observation_end_time', None) + self.aggregation_window = kwargs.get('aggregation_window', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py new file mode 100644 index 000000000000..c84f00be6592 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py @@ -0,0 +1,1861 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :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 ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :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(ProxyResource, self).__init__(**kwargs) + + +class Advisor(ProxyResource): + """Represents a recommendation action advisor. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: The properties of a recommendation action advisor. + :type properties: object + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(Advisor, self).__init__(**kwargs) + self.properties = properties + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.rdbms.mariadb.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class Configuration(ProxyResource): + """Represents a Configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param value: Value of the configuration. + :type value: str + :ivar description: Description of the configuration. + :vartype description: str + :ivar default_value: Default value of the configuration. + :vartype default_value: str + :ivar data_type: Data type of the configuration. + :vartype data_type: str + :ivar allowed_values: Allowed values of the configuration. + :vartype allowed_values: str + :param source: Source of the configuration. + :type source: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'default_value': {'readonly': True}, + 'data_type': {'readonly': True}, + 'allowed_values': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, + 'data_type': {'key': 'properties.dataType', 'type': 'str'}, + 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, source: str=None, **kwargs) -> None: + super(Configuration, self).__init__(**kwargs) + self.value = value + self.description = None + self.default_value = None + self.data_type = None + self.allowed_values = None + self.source = source + + +class Database(ProxyResource): + """Represents a Database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param charset: The charset of the database. + :type charset: str + :param collation: The collation of the database. + :type collation: 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'}, + 'charset': {'key': 'properties.charset', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + } + + def __init__(self, *, charset: str=None, collation: str=None, **kwargs) -> None: + super(Database, self).__init__(**kwargs) + self.charset = charset + self.collation = collation + + +class ErrorAdditionalInfo(Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorResponse(Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.rdbms.mariadb.models.ErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.rdbms.mariadb.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class FirewallRule(ProxyResource): + """Represents a server firewall rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param start_ip_address: Required. The start IP address of the server + firewall rule. Must be IPv4 format. + :type start_ip_address: str + :param end_ip_address: Required. The end IP address of the server firewall + rule. Must be IPv4 format. + :type end_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, + 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + } + + def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: + super(FirewallRule, self).__init__(**kwargs) + self.start_ip_address = start_ip_address + self.end_ip_address = end_ip_address + + +class LogFile(ProxyResource): + """Represents a log file. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param size_in_kb: Size of the log file. + :type size_in_kb: long + :ivar created_time: Creation timestamp of the log file. + :vartype created_time: datetime + :ivar last_modified_time: Last modified timestamp of the log file. + :vartype last_modified_time: datetime + :param log_file_type: Type of the log file. + :type log_file_type: str + :ivar url: The url to download the log file from. + :vartype url: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'log_file_type': {'key': 'properties.type', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + } + + def __init__(self, *, size_in_kb: int=None, log_file_type: str=None, **kwargs) -> None: + super(LogFile, self).__init__(**kwargs) + self.size_in_kb = size_in_kb + self.created_time = None + self.last_modified_time = None + self.log_file_type = log_file_type + self.url = None + + +class NameAvailability(Model): + """Represents a resource name availability. + + :param message: Error Message. + :type message: str + :param name_available: Indicates whether the resource name is available. + :type name_available: bool + :param reason: Reason for name being unavailable. + :type reason: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, name_available: bool=None, reason: str=None, **kwargs) -> None: + super(NameAvailability, self).__init__(**kwargs) + self.message = message + self.name_available = name_available + self.reason = reason + + +class NameAvailabilityRequest(Model): + """Request from client to check resource name availability. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource name to verify. + :type name: str + :param type: Resource type used for verification. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str, type: str=None, **kwargs) -> None: + super(NameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + + +class Operation(Model): + """REST API operation definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. + :vartype name: str + :ivar display: The localized display information for this particular + operation or action. + :vartype display: ~azure.mgmt.rdbms.mariadb.models.OperationDisplay + :ivar origin: The intended executor of the operation. Possible values + include: 'NotSpecified', 'user', 'system' + :vartype origin: str or ~azure.mgmt.rdbms.mariadb.models.OperationOrigin + :ivar properties: Additional descriptions for the operation. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + self.origin = None + self.properties = None + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Operation resource provider name. + :vartype provider: str + :ivar resource: Resource on which the operation is performed. + :vartype resource: str + :ivar operation: Localized friendly name for the operation. + :vartype operation: str + :ivar description: Operation description. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationListResult(Model): + """A list of resource provider operations. + + :param value: The list of resource provider operations. + :type value: list[~azure.mgmt.rdbms.mariadb.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(OperationListResult, self).__init__(**kwargs) + self.value = value + + +class PerformanceTierProperties(Model): + """Performance tier properties. + + :param id: ID of the performance tier. + :type id: str + :param service_level_objectives: Service level objectives associated with + the performance tier + :type service_level_objectives: + list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierServiceLevelObjectives] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, + } + + def __init__(self, *, id: str=None, service_level_objectives=None, **kwargs) -> None: + super(PerformanceTierProperties, self).__init__(**kwargs) + self.id = id + self.service_level_objectives = service_level_objectives + + +class PerformanceTierServiceLevelObjectives(Model): + """Service level objectives for performance tier. + + :param id: ID for the service level objective. + :type id: str + :param edition: Edition of the performance tier. + :type edition: str + :param v_core: vCore associated with the service level objective + :type v_core: int + :param hardware_generation: Hardware generation associated with the + service level objective + :type hardware_generation: str + :param max_backup_retention_days: Maximum Backup retention in days for the + performance tier edition + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the + performance tier edition + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'v_core': {'key': 'vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, + } + + def __init__(self, *, id: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, **kwargs) -> None: + super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) + self.id = id + self.edition = edition + self.v_core = v_core + self.hardware_generation = hardware_generation + self.max_backup_retention_days = max_backup_retention_days + self.min_backup_retention_days = min_backup_retention_days + self.max_storage_mb = max_storage_mb + self.min_storage_mb = min_storage_mb + + +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param private_endpoint: Private endpoint which the connection belongs to. + :type private_endpoint: + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateProperty + :ivar provisioning_state: State of the private endpoint connection. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + + +class PrivateEndpointProperty(Model): + """PrivateEndpointProperty. + + :param id: Resource id of the private endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(PrivateEndpointProperty, self).__init__(**kwargs) + self.id = id + + +class PrivateLinkResource(ProxyResource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar properties: The private link resource group id. + :vartype properties: + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = None + + +class PrivateLinkResourceProperties(Model): + """Properties of a private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + + +class PrivateLinkServiceConnectionStateProperty(Model): + """PrivateLinkServiceConnectionStateProperty. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. The private link service connection status. + :type status: str + :param description: Required. The private link service connection + description. + :type description: str + :ivar actions_required: The actions required for private link service + connection. + :vartype actions_required: str + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, *, status: str, description: str, **kwargs) -> None: + super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = None + + +class QueryStatistic(ProxyResource): + """Represents a Query Statistic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param query_id: Database query identifier. + :type query_id: str + :param start_time: Observation start time. + :type start_time: datetime + :param end_time: Observation end time. + :type end_time: datetime + :param aggregation_function: Aggregation function name. + :type aggregation_function: str + :param database_names: The list of database names. + :type database_names: list[str] + :param query_execution_count: Number of query executions in this time + interval. + :type query_execution_count: long + :param metric_name: Metric name. + :type metric_name: str + :param metric_display_name: Metric display name. + :type metric_display_name: str + :param metric_value: Metric value. + :type metric_value: float + :param metric_value_unit: Metric value unit. + :type metric_value_unit: 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'}, + 'query_id': {'key': 'properties.queryId', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, + 'database_names': {'key': 'properties.databaseNames', 'type': '[str]'}, + 'query_execution_count': {'key': 'properties.queryExecutionCount', 'type': 'long'}, + 'metric_name': {'key': 'properties.metricName', 'type': 'str'}, + 'metric_display_name': {'key': 'properties.metricDisplayName', 'type': 'str'}, + 'metric_value': {'key': 'properties.metricValue', 'type': 'float'}, + 'metric_value_unit': {'key': 'properties.metricValueUnit', 'type': 'str'}, + } + + def __init__(self, *, query_id: str=None, start_time=None, end_time=None, aggregation_function: str=None, database_names=None, query_execution_count: int=None, metric_name: str=None, metric_display_name: str=None, metric_value: float=None, metric_value_unit: str=None, **kwargs) -> None: + super(QueryStatistic, self).__init__(**kwargs) + self.query_id = query_id + self.start_time = start_time + self.end_time = end_time + self.aggregation_function = aggregation_function + self.database_names = database_names + self.query_execution_count = query_execution_count + self.metric_name = metric_name + self.metric_display_name = metric_display_name + self.metric_value = metric_value + self.metric_value_unit = metric_value_unit + + +class QueryText(ProxyResource): + """Represents a Query Text. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param query_id: Query identifier unique to the server. + :type query_id: str + :param query_text: Query text. + :type query_text: 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'}, + 'query_id': {'key': 'properties.queryId', 'type': 'str'}, + 'query_text': {'key': 'properties.queryText', 'type': 'str'}, + } + + def __init__(self, *, query_id: str=None, query_text: str=None, **kwargs) -> None: + super(QueryText, self).__init__(**kwargs) + self.query_id = query_id + self.query_text = query_text + + +class RecommendationAction(ProxyResource): + """Represents a Recommendation Action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param advisor_name: Advisor name. + :type advisor_name: str + :param session_id: Recommendation action session identifier. + :type session_id: str + :param action_id: Recommendation action identifier. + :type action_id: int + :param created_time: Recommendation action creation time. + :type created_time: datetime + :param expiration_time: Recommendation action expiration time. + :type expiration_time: datetime + :param reason: Recommendation action reason. + :type reason: str + :param recommendation_type: Recommendation action type. + :type recommendation_type: str + :param details: Recommendation action details. + :type details: 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'}, + 'advisor_name': {'key': 'properties.advisorName', 'type': 'str'}, + 'session_id': {'key': 'properties.sessionId', 'type': 'str'}, + 'action_id': {'key': 'properties.actionId', 'type': 'int'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, + 'reason': {'key': 'properties.reason', 'type': 'str'}, + 'recommendation_type': {'key': 'properties.recommendationType', 'type': 'str'}, + 'details': {'key': 'properties.details', 'type': '{str}'}, + } + + def __init__(self, *, advisor_name: str=None, session_id: str=None, action_id: int=None, created_time=None, expiration_time=None, reason: str=None, recommendation_type: str=None, details=None, **kwargs) -> None: + super(RecommendationAction, self).__init__(**kwargs) + self.advisor_name = advisor_name + self.session_id = session_id + self.action_id = action_id + self.created_time = created_time + self.expiration_time = expiration_time + self.reason = reason + self.recommendation_type = recommendation_type + self.details = details + + +class RecommendationActionsResultList(Model): + """A list of recommendation actions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of recommendation action advisors. + :vartype value: + list[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] + :ivar next_link: Link to retrieve next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RecommendationAction]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RecommendationActionsResultList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class RecommendedActionSessionsOperationStatus(Model): + """Recommendation action session operation status. + + :param name: Operation identifier. + :type name: str + :param start_time: Operation start time. + :type start_time: datetime + :param status: Operation status. + :type status: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, start_time=None, status: str=None, **kwargs) -> None: + super(RecommendedActionSessionsOperationStatus, self).__init__(**kwargs) + self.name = name + self.start_time = start_time + self.status = status + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class Server(TrackedResource): + """Represents a server. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku + :param administrator_login: The administrator's login name of a server. + Can only be specified when the server is being created (and is required + for creation). + :type administrator_login: str + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param user_visible_state: A state of a server that is visible to user. + Possible values include: 'Ready', 'Dropping', 'Disabled' + :type user_visible_state: str or + ~azure.mgmt.rdbms.mariadb.models.ServerState + :param fully_qualified_domain_name: The fully qualified domain name of a + server. + :type fully_qualified_domain_name: str + :param earliest_restore_date: Earliest restore point creation time + (ISO8601 format) + :type earliest_restore_date: datetime + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param replication_role: The replication role of the server. + :type replication_role: str + :param master_server_id: The master server id of a replica server. + :type master_server_id: str + :param replica_capacity: The maximum number of replicas that a master + server can have. + :type replica_capacity: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'replica_capacity': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, + 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, replication_role: str=None, master_server_id: str=None, replica_capacity: int=None, **kwargs) -> None: + super(Server, self).__init__(tags=tags, location=location, **kwargs) + self.sku = sku + self.administrator_login = administrator_login + self.version = version + self.ssl_enforcement = ssl_enforcement + self.user_visible_state = user_visible_state + self.fully_qualified_domain_name = fully_qualified_domain_name + self.earliest_restore_date = earliest_restore_date + self.storage_profile = storage_profile + self.replication_role = replication_role + self.master_server_id = master_server_id + self.replica_capacity = replica_capacity + + +class ServerForCreate(Model): + """Represents a server to be created. + + All required parameters must be populated in order to send to Azure. + + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku + :param properties: Required. Properties of the server. + :type properties: + ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate + :param location: Required. The location the resource resides in. + :type location: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _validation = { + 'properties': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, properties, location: str, sku=None, tags=None, **kwargs) -> None: + super(ServerForCreate, self).__init__(**kwargs) + self.sku = sku + self.properties = properties + self.location = location + self.tags = tags + + +class ServerPropertiesForCreate(Model): + """The properties used to create a new server. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServerPropertiesForDefaultCreate, + ServerPropertiesForRestore, ServerPropertiesForGeoRestore, + ServerPropertiesForReplica + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + """ + + _validation = { + 'create_mode': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + } + + _subtype_map = { + 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} + } + + def __init__(self, *, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: + super(ServerPropertiesForCreate, self).__init__(**kwargs) + self.version = version + self.ssl_enforcement = ssl_enforcement + self.storage_profile = storage_profile + self.create_mode = None + + +class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): + """The properties used to create a new server. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param administrator_login: Required. The administrator's login name of a + server. Can only be specified when the server is being created (and is + required for creation). + :type administrator_login: str + :param administrator_login_password: Required. The password of the + administrator login. + :type administrator_login_password: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'administrator_login': {'required': True}, + 'administrator_login_password': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, + } + + def __init__(self, *, administrator_login: str, administrator_login_password: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: + super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.create_mode = 'Default' + + +class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring to a different + region from a geo replicated backup. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param source_server_id: Required. The source server id to restore from. + :type source_server_id: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + } + + def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: + super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) + self.source_server_id = source_server_id + self.create_mode = 'GeoRestore' + + +class ServerPropertiesForReplica(ServerPropertiesForCreate): + """The properties to create a new replica. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param source_server_id: Required. The master server id to create replica + from. + :type source_server_id: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + } + + def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: + super(ServerPropertiesForReplica, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) + self.source_server_id = source_server_id + self.create_mode = 'Replica' + + +class ServerPropertiesForRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring from a backup. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '5.6', '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param source_server_id: Required. The source server id to restore from. + :type source_server_id: str + :param restore_point_in_time: Required. Restore point creation time + (ISO8601 format), specifying the time to restore from. + :type restore_point_in_time: datetime + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + 'restore_point_in_time': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, source_server_id: str, restore_point_in_time, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: + super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) + self.source_server_id = source_server_id + self.restore_point_in_time = restore_point_in_time + self.create_mode = 'PointInTimeRestore' + + +class ServerSecurityAlertPolicy(ProxyResource): + """A server security alert policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled. Possible values include: 'Enabled', 'Disabled' + :type state: str or + ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + + +class ServerUpdateParameters(Model): + """Parameters allowed to update for a server. + + :param sku: The SKU (pricing tier) of the server. + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile + :param administrator_login_password: The password of the administrator + login. + :type administrator_login_password: str + :param version: The version of a server. Possible values include: '5.6', + '5.7' + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum + :param replication_role: The replication role of the server. + :type replication_role: str + :param tags: Application-specific metadata in the form of key-value pairs. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, storage_profile=None, administrator_login_password: str=None, version=None, ssl_enforcement=None, replication_role: str=None, tags=None, **kwargs) -> None: + super(ServerUpdateParameters, self).__init__(**kwargs) + self.sku = sku + self.storage_profile = storage_profile + self.administrator_login_password = administrator_login_password + self.version = version + self.ssl_enforcement = ssl_enforcement + self.replication_role = replication_role + self.tags = tags + + +class Sku(Model): + """Billing information related properties of a server. + + :param name: The name of the sku, typically, tier + family + cores, e.g. + B_Gen4_1, GP_Gen5_8. + :type name: str + :param tier: The tier of the particular SKU, e.g. Basic. Possible values + include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' + :type tier: str or ~azure.mgmt.rdbms.mariadb.models.SkuTier + :param capacity: The scale up/out capacity, representing server's compute + units. + :type capacity: int + :param size: The size code, to be interpreted by resource as appropriate. + :type size: str + :param family: The family of hardware. + :type family: str + """ + + _validation = { + 'capacity': {'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, tier=None, capacity: int=None, size: str=None, family: str=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + self.size = size + self.family = family + + +class StorageProfile(Model): + """Storage Profile properties of a server. + + :param backup_retention_days: Backup retention days for the server. + :type backup_retention_days: int + :param geo_redundant_backup: Enable Geo-redundant or not for server + backup. Possible values include: 'Enabled', 'Disabled' + :type geo_redundant_backup: str or + ~azure.mgmt.rdbms.mariadb.models.GeoRedundantBackup + :param storage_mb: Max storage allowed for a server. + :type storage_mb: int + :param storage_autogrow: Enable Storage Auto Grow. Possible values + include: 'Enabled', 'Disabled' + :type storage_autogrow: str or + ~azure.mgmt.rdbms.mariadb.models.StorageAutogrow + """ + + _attribute_map = { + 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, + 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, + 'storage_mb': {'key': 'storageMB', 'type': 'int'}, + 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, + } + + def __init__(self, *, backup_retention_days: int=None, geo_redundant_backup=None, storage_mb: int=None, storage_autogrow=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.backup_retention_days = backup_retention_days + self.geo_redundant_backup = geo_redundant_backup + self.storage_mb = storage_mb + self.storage_autogrow = storage_autogrow + + +class TagsObject(Model): + """Tags object for patch operations. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsObject, self).__init__(**kwargs) + self.tags = tags + + +class TopQueryStatisticsInput(Model): + """Input to get top query statistics. + + All required parameters must be populated in order to send to Azure. + + :param number_of_top_queries: Required. Max number of top queries to + return. + :type number_of_top_queries: int + :param aggregation_function: Required. Aggregation function name. + :type aggregation_function: str + :param observed_metric: Required. Observed metric name. + :type observed_metric: str + :param observation_start_time: Required. Observation start time. + :type observation_start_time: datetime + :param observation_end_time: Required. Observation end time. + :type observation_end_time: datetime + :param aggregation_window: Required. Aggregation interval type in ISO 8601 + format. + :type aggregation_window: str + """ + + _validation = { + 'number_of_top_queries': {'required': True}, + 'aggregation_function': {'required': True}, + 'observed_metric': {'required': True}, + 'observation_start_time': {'required': True}, + 'observation_end_time': {'required': True}, + 'aggregation_window': {'required': True}, + } + + _attribute_map = { + 'number_of_top_queries': {'key': 'properties.numberOfTopQueries', 'type': 'int'}, + 'aggregation_function': {'key': 'properties.aggregationFunction', 'type': 'str'}, + 'observed_metric': {'key': 'properties.observedMetric', 'type': 'str'}, + 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, + 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, + 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, + } + + def __init__(self, *, number_of_top_queries: int, aggregation_function: str, observed_metric: str, observation_start_time, observation_end_time, aggregation_window: str, **kwargs) -> None: + super(TopQueryStatisticsInput, self).__init__(**kwargs) + self.number_of_top_queries = number_of_top_queries + self.aggregation_function = aggregation_function + self.observed_metric = observed_metric + self.observation_start_time = observation_start_time + self.observation_end_time = observation_end_time + self.aggregation_window = aggregation_window + + +class VirtualNetworkRule(ProxyResource): + """A virtual network rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param virtual_network_subnet_id: Required. The ARM resource id of the + virtual network subnet. + :type virtual_network_subnet_id: str + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + :ivar state: Virtual Network Rule State. Possible values include: + 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + :vartype state: str or + ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_network_subnet_id': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = virtual_network_subnet_id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + self.state = None + + +class WaitStatistic(ProxyResource): + """Represents a Wait Statistic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param start_time: Observation start time. + :type start_time: datetime + :param end_time: Observation end time. + :type end_time: datetime + :param event_name: Wait event name. + :type event_name: str + :param event_type_name: Wait event type name. + :type event_type_name: str + :param query_id: Database query identifier. + :type query_id: long + :param database_name: Database Name. + :type database_name: str + :param user_id: Database user identifier. + :type user_id: long + :param count: Wait event count observed in this time interval. + :type count: long + :param total_time_in_ms: Total time of wait in milliseconds in this time + interval. + :type total_time_in_ms: float + """ + + _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'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'event_name': {'key': 'properties.eventName', 'type': 'str'}, + 'event_type_name': {'key': 'properties.eventTypeName', 'type': 'str'}, + 'query_id': {'key': 'properties.queryId', 'type': 'long'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'long'}, + 'count': {'key': 'properties.count', 'type': 'long'}, + 'total_time_in_ms': {'key': 'properties.totalTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, start_time=None, end_time=None, event_name: str=None, event_type_name: str=None, query_id: int=None, database_name: str=None, user_id: int=None, count: int=None, total_time_in_ms: float=None, **kwargs) -> None: + super(WaitStatistic, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.event_name = event_name + self.event_type_name = event_type_name + self.query_id = query_id + self.database_name = database_name + self.user_id = user_id + self.count = count + self.total_time_in_ms = total_time_in_ms + + +class WaitStatisticsInput(Model): + """Input to get wait statistics. + + All required parameters must be populated in order to send to Azure. + + :param observation_start_time: Required. Observation start time. + :type observation_start_time: datetime + :param observation_end_time: Required. Observation end time. + :type observation_end_time: datetime + :param aggregation_window: Required. Aggregation interval type in ISO 8601 + format. + :type aggregation_window: str + """ + + _validation = { + 'observation_start_time': {'required': True}, + 'observation_end_time': {'required': True}, + 'aggregation_window': {'required': True}, + } + + _attribute_map = { + 'observation_start_time': {'key': 'properties.observationStartTime', 'type': 'iso-8601'}, + 'observation_end_time': {'key': 'properties.observationEndTime', 'type': 'iso-8601'}, + 'aggregation_window': {'key': 'properties.aggregationWindow', 'type': 'str'}, + } + + def __init__(self, *, observation_start_time, observation_end_time, aggregation_window: str, **kwargs) -> None: + super(WaitStatisticsInput, self).__init__(**kwargs) + self.observation_start_time = observation_start_time + self.observation_end_time = observation_end_time + self.aggregation_window = aggregation_window diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_paged_models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_paged_models.py new file mode 100644 index 000000000000..ef79111fe093 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_paged_models.py @@ -0,0 +1,196 @@ +# 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 ServerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Server ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Server]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerPaged, self).__init__(*args, **kwargs) +class FirewallRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`FirewallRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[FirewallRule]'} + } + + def __init__(self, *args, **kwargs): + + super(FirewallRulePaged, self).__init__(*args, **kwargs) +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) +class DatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`Database ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Database]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabasePaged, self).__init__(*args, **kwargs) +class ConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Configuration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Configuration]'} + } + + def __init__(self, *args, **kwargs): + + super(ConfigurationPaged, self).__init__(*args, **kwargs) +class LogFilePaged(Paged): + """ + A paging container for iterating over a list of :class:`LogFile ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LogFile]'} + } + + def __init__(self, *args, **kwargs): + + super(LogFilePaged, self).__init__(*args, **kwargs) +class PerformanceTierPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`PerformanceTierProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PerformanceTierProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(PerformanceTierPropertiesPaged, self).__init__(*args, **kwargs) +class QueryTextPaged(Paged): + """ + A paging container for iterating over a list of :class:`QueryText ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[QueryText]'} + } + + def __init__(self, *args, **kwargs): + + super(QueryTextPaged, self).__init__(*args, **kwargs) +class QueryStatisticPaged(Paged): + """ + A paging container for iterating over a list of :class:`QueryStatistic ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[QueryStatistic]'} + } + + def __init__(self, *args, **kwargs): + + super(QueryStatisticPaged, self).__init__(*args, **kwargs) +class WaitStatisticPaged(Paged): + """ + A paging container for iterating over a list of :class:`WaitStatistic ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WaitStatistic]'} + } + + def __init__(self, *args, **kwargs): + + super(WaitStatisticPaged, self).__init__(*args, **kwargs) +class AdvisorPaged(Paged): + """ + A paging container for iterating over a list of :class:`Advisor ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Advisor]'} + } + + def __init__(self, *args, **kwargs): + + super(AdvisorPaged, self).__init__(*args, **kwargs) +class RecommendationActionPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecommendationAction ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecommendationAction]'} + } + + def __init__(self, *args, **kwargs): + + super(RecommendationActionPaged, self).__init__(*args, **kwargs) +class PrivateEndpointConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) +class PrivateLinkResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateLinkResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateLinkResource]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration.py deleted file mode 100644 index 8d95fc4a0f25..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration.py +++ /dev/null @@ -1,70 +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 .proxy_resource import ProxyResource - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Configuration, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = kwargs.get('source', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration_paged.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration_paged.py deleted file mode 100644 index c70c45f28d4e..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration_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 ConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Configuration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Configuration]'} - } - - def __init__(self, *args, **kwargs): - - super(ConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration_py3.py deleted file mode 100644 index 59929c953a7e..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration_py3.py +++ /dev/null @@ -1,70 +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 .proxy_resource_py3 import ProxyResource - - -class Configuration(ProxyResource): - """Represents a Configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param value: Value of the configuration. - :type value: str - :ivar description: Description of the configuration. - :vartype description: str - :ivar default_value: Default value of the configuration. - :vartype default_value: str - :ivar data_type: Data type of the configuration. - :vartype data_type: str - :ivar allowed_values: Allowed values of the configuration. - :vartype allowed_values: str - :param source: Source of the configuration. - :type source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'default_value': {'readonly': True}, - 'data_type': {'readonly': True}, - 'allowed_values': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'default_value': {'key': 'properties.defaultValue', 'type': 'str'}, - 'data_type': {'key': 'properties.dataType', 'type': 'str'}, - 'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(**kwargs) - self.value = value - self.description = None - self.default_value = None - self.data_type = None - self.allowed_values = None - self.source = source diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/database.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/database.py deleted file mode 100644 index f503efb9fa34..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/database.py +++ /dev/null @@ -1,50 +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 .proxy_resource import ProxyResource - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: 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'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Database, self).__init__(**kwargs) - self.charset = kwargs.get('charset', None) - self.collation = kwargs.get('collation', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/database_paged.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/database_paged.py deleted file mode 100644 index 0085e88f5c49..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/database_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 DatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`Database ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Database]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/database_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/database_py3.py deleted file mode 100644 index af8b0ce61e7c..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/database_py3.py +++ /dev/null @@ -1,50 +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 .proxy_resource_py3 import ProxyResource - - -class Database(ProxyResource): - """Represents a Database. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param charset: The charset of the database. - :type charset: str - :param collation: The collation of the database. - :type collation: 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'}, - 'charset': {'key': 'properties.charset', 'type': 'str'}, - 'collation': {'key': 'properties.collation', 'type': 'str'}, - } - - def __init__(self, *, charset: str=None, collation: str=None, **kwargs) -> None: - super(Database, self).__init__(**kwargs) - self.charset = charset - self.collation = collation diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/firewall_rule.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/firewall_rule.py deleted file mode 100644 index af9a04f835d9..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/firewall_rule.py +++ /dev/null @@ -1,56 +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 .proxy_resource import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = kwargs.get('start_ip_address', None) - self.end_ip_address = kwargs.get('end_ip_address', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/firewall_rule_paged.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/firewall_rule_paged.py deleted file mode 100644 index 8b2f23768209..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/firewall_rule_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 FirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`FirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[FirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(FirewallRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/firewall_rule_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/firewall_rule_py3.py deleted file mode 100644 index f5da7a6331e5..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/firewall_rule_py3.py +++ /dev/null @@ -1,56 +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 .proxy_resource_py3 import ProxyResource - - -class FirewallRule(ProxyResource): - """Represents a server firewall rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param start_ip_address: Required. The start IP address of the server - firewall rule. Must be IPv4 format. - :type start_ip_address: str - :param end_ip_address: Required. The end IP address of the server firewall - rule. Must be IPv4 format. - :type end_ip_address: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - 'end_ip_address': {'required': True, 'pattern': r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - } - - def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(**kwargs) - self.start_ip_address = start_ip_address - self.end_ip_address = end_ip_address diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/log_file.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/log_file.py deleted file mode 100644 index 557c79536e1d..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/log_file.py +++ /dev/null @@ -1,65 +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 .proxy_resource import ProxyResource - - -class LogFile(ProxyResource): - """Represents a log file. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param size_in_kb: Size of the log file. - :type size_in_kb: long - :ivar created_time: Creation timestamp of the log file. - :vartype created_time: datetime - :ivar last_modified_time: Last modified timestamp of the log file. - :vartype last_modified_time: datetime - :param log_file_type: Type of the log file. - :type log_file_type: str - :ivar url: The url to download the log file from. - :vartype url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'url': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'log_file_type': {'key': 'properties.type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = kwargs.get('size_in_kb', None) - self.created_time = None - self.last_modified_time = None - self.log_file_type = kwargs.get('log_file_type', None) - self.url = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/log_file_paged.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/log_file_paged.py deleted file mode 100644 index aaa67eb18dd9..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/log_file_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 LogFilePaged(Paged): - """ - A paging container for iterating over a list of :class:`LogFile ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LogFile]'} - } - - def __init__(self, *args, **kwargs): - - super(LogFilePaged, self).__init__(*args, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/log_file_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/log_file_py3.py deleted file mode 100644 index c5ff4ea6d345..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/log_file_py3.py +++ /dev/null @@ -1,65 +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 .proxy_resource_py3 import ProxyResource - - -class LogFile(ProxyResource): - """Represents a log file. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param size_in_kb: Size of the log file. - :type size_in_kb: long - :ivar created_time: Creation timestamp of the log file. - :vartype created_time: datetime - :ivar last_modified_time: Last modified timestamp of the log file. - :vartype last_modified_time: datetime - :param log_file_type: Type of the log file. - :type log_file_type: str - :ivar url: The url to download the log file from. - :vartype url: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'last_modified_time': {'readonly': True}, - 'url': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, - 'log_file_type': {'key': 'properties.type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - } - - def __init__(self, *, size_in_kb: int=None, log_file_type: str=None, **kwargs) -> None: - super(LogFile, self).__init__(**kwargs) - self.size_in_kb = size_in_kb - self.created_time = None - self.last_modified_time = None - self.log_file_type = log_file_type - self.url = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability.py deleted file mode 100644 index 327a74ca8a48..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability.py +++ /dev/null @@ -1,36 +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 NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability_py3.py deleted file mode 100644 index f7b52a09e29f..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability_py3.py +++ /dev/null @@ -1,36 +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 NameAvailability(Model): - """Represents a resource name availability. - - :param message: Error Message. - :type message: str - :param name_available: Indicates whether the resource name is available. - :type name_available: bool - :param reason: Reason for name being unavailable. - :type reason: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, name_available: bool=None, reason: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.message = message - self.name_available = name_available - self.reason = reason diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability_request.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability_request.py deleted file mode 100644 index 33cac8ab5308..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability_request.py +++ /dev/null @@ -1,38 +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 NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability_request_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability_request_py3.py deleted file mode 100644 index ec45bb2e4730..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/name_availability_request_py3.py +++ /dev/null @@ -1,38 +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 NameAvailabilityRequest(Model): - """Request from client to check resource name availability. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name to verify. - :type name: str - :param type: Resource type used for verification. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, type: str=None, **kwargs) -> None: - super(NameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation.py deleted file mode 100644 index a4d12d9c276b..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation.py +++ /dev/null @@ -1,53 +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 Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: ~azure.mgmt.rdbms.mariadb.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or ~azure.mgmt.rdbms.mariadb.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_display.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_display.py deleted file mode 100644 index 98314a2871d5..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_display.py +++ /dev/null @@ -1,50 +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 OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_display_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_display_py3.py deleted file mode 100644 index 9b5a77c699a9..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_display_py3.py +++ /dev/null @@ -1,50 +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 OperationDisplay(Model): - """Display metadata associated with the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Operation resource provider name. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Operation description. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_list_result.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_list_result.py deleted file mode 100644 index 5d6b31a6fe76..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_list_result.py +++ /dev/null @@ -1,28 +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 OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mariadb.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_list_result_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_list_result_py3.py deleted file mode 100644 index cff8b627ecd5..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_list_result_py3.py +++ /dev/null @@ -1,28 +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 OperationListResult(Model): - """A list of resource provider operations. - - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mariadb.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_py3.py deleted file mode 100644 index fe3b01b0a8e1..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/operation_py3.py +++ /dev/null @@ -1,53 +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 Operation(Model): - """REST API operation definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. - :vartype name: str - :ivar display: The localized display information for this particular - operation or action. - :vartype display: ~azure.mgmt.rdbms.mariadb.models.OperationDisplay - :ivar origin: The intended executor of the operation. Possible values - include: 'NotSpecified', 'user', 'system' - :vartype origin: str or ~azure.mgmt.rdbms.mariadb.models.OperationOrigin - :ivar properties: Additional descriptions for the operation. - :vartype properties: dict[str, object] - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - 'origin': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.origin = None - self.properties = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_properties.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_properties.py deleted file mode 100644 index c33af34599e1..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_properties.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 PerformanceTierProperties(Model): - """Performance tier properties. - - :param id: ID of the performance tier. - :type id: str - :param service_level_objectives: Service level objectives associated with - the performance tier - :type service_level_objectives: - list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, **kwargs): - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_level_objectives = kwargs.get('service_level_objectives', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_properties_paged.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_properties_paged.py deleted file mode 100644 index 17c6acdcff18..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_properties_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 PerformanceTierPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`PerformanceTierProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PerformanceTierProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(PerformanceTierPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_properties_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_properties_py3.py deleted file mode 100644 index e2839d4114ae..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_properties_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 PerformanceTierProperties(Model): - """Performance tier properties. - - :param id: ID of the performance tier. - :type id: str - :param service_level_objectives: Service level objectives associated with - the performance tier - :type service_level_objectives: - list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierServiceLevelObjectives] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, - } - - def __init__(self, *, id: str=None, service_level_objectives=None, **kwargs) -> None: - super(PerformanceTierProperties, self).__init__(**kwargs) - self.id = id - self.service_level_objectives = service_level_objectives diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_service_level_objectives.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_service_level_objectives.py deleted file mode 100644 index 4f653dc28347..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_service_level_objectives.py +++ /dev/null @@ -1,59 +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 PerformanceTierServiceLevelObjectives(Model): - """Service level objectives for performance tier. - - :param id: ID for the service level objective. - :type id: str - :param edition: Edition of the performance tier. - :type edition: str - :param v_core: vCore associated with the service level objective - :type v_core: int - :param hardware_generation: Hardware generation associated with the - service level objective - :type hardware_generation: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'v_core': {'key': 'vCore', 'type': 'int'}, - 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.edition = kwargs.get('edition', None) - self.v_core = kwargs.get('v_core', None) - self.hardware_generation = kwargs.get('hardware_generation', None) - self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) - self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) - self.max_storage_mb = kwargs.get('max_storage_mb', None) - self.min_storage_mb = kwargs.get('min_storage_mb', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_service_level_objectives_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_service_level_objectives_py3.py deleted file mode 100644 index 083e4720ab47..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/performance_tier_service_level_objectives_py3.py +++ /dev/null @@ -1,59 +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 PerformanceTierServiceLevelObjectives(Model): - """Service level objectives for performance tier. - - :param id: ID for the service level objective. - :type id: str - :param edition: Edition of the performance tier. - :type edition: str - :param v_core: vCore associated with the service level objective - :type v_core: int - :param hardware_generation: Hardware generation associated with the - service level objective - :type hardware_generation: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'v_core': {'key': 'vCore', 'type': 'int'}, - 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, - } - - def __init__(self, *, id: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, **kwargs) -> None: - super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) - self.id = id - self.edition = edition - self.v_core = v_core - self.hardware_generation = hardware_generation - self.max_backup_retention_days = max_backup_retention_days - self.min_backup_retention_days = min_backup_retention_days - self.max_storage_mb = max_storage_mb - self.min_storage_mb = min_storage_mb diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/proxy_resource.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/proxy_resource.py deleted file mode 100644 index 1223f4670fe9..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/proxy_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 ProxyResource(Model): - """Resource properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :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(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/proxy_resource_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/proxy_resource_py3.py deleted file mode 100644 index e0dde467e583..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/proxy_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 ProxyResource(Model): - """Resource properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :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(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server.py deleted file mode 100644 index 45879abb4926..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server.py +++ /dev/null @@ -1,105 +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 .tracked_resource import TrackedResource - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param user_visible_state: A state of a server that is visible to user. - Possible values include: 'Ready', 'Dropping', 'Disabled' - :type user_visible_state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerState - :param fully_qualified_domain_name: The fully qualified domain name of a - server. - :type fully_qualified_domain_name: str - :param earliest_restore_date: Earliest restore point creation time - (ISO8601 format) - :type earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a replica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'replica_capacity': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Server, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.administrator_login = kwargs.get('administrator_login', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.user_visible_state = kwargs.get('user_visible_state', None) - self.fully_qualified_domain_name = kwargs.get('fully_qualified_domain_name', None) - self.earliest_restore_date = kwargs.get('earliest_restore_date', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.replication_role = kwargs.get('replication_role', None) - self.master_server_id = kwargs.get('master_server_id', None) - self.replica_capacity = kwargs.get('replica_capacity', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_for_create.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_for_create.py deleted file mode 100644 index 50a281d34eb1..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_for_create.py +++ /dev/null @@ -1,48 +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 ServerForCreate(Model): - """Represents a server to be created. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'properties': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerForCreate, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_for_create_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_for_create_py3.py deleted file mode 100644 index ecc98cbe3e11..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_for_create_py3.py +++ /dev/null @@ -1,48 +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 ServerForCreate(Model): - """Represents a server to be created. - - All required parameters must be populated in order to send to Azure. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param properties: Required. Properties of the server. - :type properties: - ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'properties': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'properties': {'key': 'properties', 'type': 'ServerPropertiesForCreate'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, properties, location: str, sku=None, tags=None, **kwargs) -> None: - super(ServerForCreate, self).__init__(**kwargs) - self.sku = sku - self.properties = properties - self.location = location - self.tags = tags diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_paged.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_paged.py deleted file mode 100644 index 02a6b22a2370..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_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 ServerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Server ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Server]'} - } - - def __init__(self, *args, **kwargs): - - super(ServerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_create.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_create.py deleted file mode 100644 index d280b70ef836..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_create.py +++ /dev/null @@ -1,57 +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 ServerPropertiesForCreate(Model): - """The properties used to create a new server. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore, ServerPropertiesForGeoRestore, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - """ - - _validation = { - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, **kwargs): - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.create_mode = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_create_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_create_py3.py deleted file mode 100644 index 52fe7623bdd2..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_create_py3.py +++ /dev/null @@ -1,57 +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 ServerPropertiesForCreate(Model): - """The properties used to create a new server. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore, ServerPropertiesForGeoRestore, - ServerPropertiesForReplica - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - """ - - _validation = { - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'} - } - - def __init__(self, *, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForCreate, self).__init__(**kwargs) - self.version = version - self.ssl_enforcement = ssl_enforcement - self.storage_profile = storage_profile - self.create_mode = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_default_create.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_default_create.py deleted file mode 100644 index 9f77a8e405b0..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_default_create.py +++ /dev/null @@ -1,58 +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 .server_properties_for_create import ServerPropertiesForCreate - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. The administrator's login name of a - server. Can only be specified when the server is being created (and is - required for creation). - :type administrator_login: str - :param administrator_login_password: Required. The password of the - administrator login. - :type administrator_login_password: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForDefaultCreate, self).__init__(**kwargs) - self.administrator_login = kwargs.get('administrator_login', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.create_mode = 'Default' diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_default_create_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_default_create_py3.py deleted file mode 100644 index f2f8089ff376..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_default_create_py3.py +++ /dev/null @@ -1,58 +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 .server_properties_for_create_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): - """The properties used to create a new server. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param administrator_login: Required. The administrator's login name of a - server. Can only be specified when the server is being created (and is - required for creation). - :type administrator_login: str - :param administrator_login_password: Required. The password of the - administrator login. - :type administrator_login_password: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'administrator_login': {'required': True}, - 'administrator_login_password': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, - 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, - } - - def __init__(self, *, administrator_login: str, administrator_login_password: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForDefaultCreate, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.administrator_login = administrator_login - self.administrator_login_password = administrator_login_password - self.create_mode = 'Default' diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_geo_restore.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_geo_restore.py deleted file mode 100644 index deb90b6ffa9e..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_geo_restore.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 .server_properties_for_create import ServerPropertiesForCreate - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForGeoRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'GeoRestore' diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_geo_restore_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_geo_restore_py3.py deleted file mode 100644 index 33ebbba962d0..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_geo_restore_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 .server_properties_for_create_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring to a different - region from a geo replicated backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'GeoRestore' diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_replica.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_replica.py deleted file mode 100644 index 06c4ec8de8b4..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_replica.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 .server_properties_for_create import ServerPropertiesForCreate - - -class ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForReplica, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.create_mode = 'Replica' diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_replica_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_replica_py3.py deleted file mode 100644 index 6f129d07fbb0..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_replica_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 .server_properties_for_create_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForReplica(ServerPropertiesForCreate): - """The properties to create a new replica. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The master server id to create replica - from. - :type source_server_id: str - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - } - - def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForReplica, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.create_mode = 'Replica' diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_restore.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_restore.py deleted file mode 100644 index 620a7e7ba2cf..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_restore.py +++ /dev/null @@ -1,56 +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 .server_properties_for_create import ServerPropertiesForCreate - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. Restore point creation time - (ISO8601 format), specifying the time to restore from. - :type restore_point_in_time: datetime - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - 'restore_point_in_time': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServerPropertiesForRestore, self).__init__(**kwargs) - self.source_server_id = kwargs.get('source_server_id', None) - self.restore_point_in_time = kwargs.get('restore_point_in_time', None) - self.create_mode = 'PointInTimeRestore' diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_restore_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_restore_py3.py deleted file mode 100644 index 7b6fa4702bb5..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_properties_for_restore_py3.py +++ /dev/null @@ -1,56 +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 .server_properties_for_create_py3 import ServerPropertiesForCreate - - -class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties used to create a new server by restoring from a backup. - - All required parameters must be populated in order to send to Azure. - - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param source_server_id: Required. The source server id to restore from. - :type source_server_id: str - :param restore_point_in_time: Required. Restore point creation time - (ISO8601 format), specifying the time to restore from. - :type restore_point_in_time: datetime - """ - - _validation = { - 'create_mode': {'required': True}, - 'source_server_id': {'required': True}, - 'restore_point_in_time': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, - 'restore_point_in_time': {'key': 'restorePointInTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, source_server_id: str, restore_point_in_time, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: - super(ServerPropertiesForRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) - self.source_server_id = source_server_id - self.restore_point_in_time = restore_point_in_time - self.create_mode = 'PointInTimeRestore' diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_py3.py deleted file mode 100644 index a6b008ecbc26..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_py3.py +++ /dev/null @@ -1,105 +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 .tracked_resource_py3 import TrackedResource - - -class Server(TrackedResource): - """Represents a server. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param administrator_login: The administrator's login name of a server. - Can only be specified when the server is being created (and is required - for creation). - :type administrator_login: str - :param version: Server version. Possible values include: '5.6', '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param user_visible_state: A state of a server that is visible to user. - Possible values include: 'Ready', 'Dropping', 'Disabled' - :type user_visible_state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerState - :param fully_qualified_domain_name: The fully qualified domain name of a - server. - :type fully_qualified_domain_name: str - :param earliest_restore_date: Earliest restore point creation time - (ISO8601 format) - :type earliest_restore_date: datetime - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param replication_role: The replication role of the server. - :type replication_role: str - :param master_server_id: The master server id of a replica server. - :type master_server_id: str - :param replica_capacity: The maximum number of replicas that a master - server can have. - :type replica_capacity: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'replica_capacity': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'user_visible_state': {'key': 'properties.userVisibleState', 'type': 'str'}, - 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'}, - 'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, replication_role: str=None, master_server_id: str=None, replica_capacity: int=None, **kwargs) -> None: - super(Server, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.administrator_login = administrator_login - self.version = version - self.ssl_enforcement = ssl_enforcement - self.user_visible_state = user_visible_state - self.fully_qualified_domain_name = fully_qualified_domain_name - self.earliest_restore_date = earliest_restore_date - self.storage_profile = storage_profile - self.replication_role = replication_role - self.master_server_id = master_server_id - self.replica_capacity = replica_capacity diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_security_alert_policy.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_security_alert_policy.py deleted file mode 100644 index 5fa0f877316a..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_security_alert_policy.py +++ /dev/null @@ -1,83 +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 .proxy_resource import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.disabled_alerts = kwargs.get('disabled_alerts', None) - self.email_addresses = kwargs.get('email_addresses', None) - self.email_account_admins = kwargs.get('email_account_admins', None) - self.storage_endpoint = kwargs.get('storage_endpoint', None) - self.storage_account_access_key = kwargs.get('storage_account_access_key', None) - self.retention_days = kwargs.get('retention_days', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_security_alert_policy_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_security_alert_policy_py3.py deleted file mode 100644 index 4a44fb648913..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_security_alert_policy_py3.py +++ /dev/null @@ -1,83 +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 .proxy_resource_py3 import ProxyResource - - -class ServerSecurityAlertPolicy(ProxyResource): - """A server security alert policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param state: Required. Specifies the state of the policy, whether it is - enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type state: str or - ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState - :param disabled_alerts: Specifies an array of alerts that are disabled. - Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - Access_Anomaly - :type disabled_alerts: list[str] - :param email_addresses: Specifies an array of e-mail addresses to which - the alert is sent. - :type email_addresses: list[str] - :param email_account_admins: Specifies that the alert is sent to the - account administrators. - :type email_account_admins: bool - :param storage_endpoint: Specifies the blob storage endpoint (e.g. - https://MyAccount.blob.core.windows.net). This blob storage will hold all - Threat Detection audit logs. - :type storage_endpoint: str - :param storage_account_access_key: Specifies the identifier key of the - Threat Detection audit storage account. - :type storage_account_access_key: str - :param retention_days: Specifies the number of days to keep in the Threat - Detection audit logs. - :type retention_days: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, - 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, - 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, - 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, - 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, - 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, - 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, - } - - def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: - super(ServerSecurityAlertPolicy, self).__init__(**kwargs) - self.state = state - self.disabled_alerts = disabled_alerts - self.email_addresses = email_addresses - self.email_account_admins = email_account_admins - self.storage_endpoint = storage_endpoint - self.storage_account_access_key = storage_account_access_key - self.retention_days = retention_days diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_update_parameters.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_update_parameters.py deleted file mode 100644 index 6e4206a68832..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_update_parameters.py +++ /dev/null @@ -1,56 +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 ServerUpdateParameters(Model): - """Parameters allowed to update for a server. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param version: The version of a server. Possible values include: '5.6', - '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ServerUpdateParameters, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.administrator_login_password = kwargs.get('administrator_login_password', None) - self.version = kwargs.get('version', None) - self.ssl_enforcement = kwargs.get('ssl_enforcement', None) - self.replication_role = kwargs.get('replication_role', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_update_parameters_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_update_parameters_py3.py deleted file mode 100644 index 7557b7439eda..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_update_parameters_py3.py +++ /dev/null @@ -1,56 +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 ServerUpdateParameters(Model): - """Parameters allowed to update for a server. - - :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku - :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile - :param administrator_login_password: The password of the administrator - login. - :type administrator_login_password: str - :param version: The version of a server. Possible values include: '5.6', - '5.7' - :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion - :param ssl_enforcement: Enable ssl enforcement or not when connect to - server. Possible values include: 'Enabled', 'Disabled' - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum - :param replication_role: The replication role of the server. - :type replication_role: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'}, - 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku=None, storage_profile=None, administrator_login_password: str=None, version=None, ssl_enforcement=None, replication_role: str=None, tags=None, **kwargs) -> None: - super(ServerUpdateParameters, self).__init__(**kwargs) - self.sku = sku - self.storage_profile = storage_profile - self.administrator_login_password = administrator_login_password - self.version = version - self.ssl_enforcement = ssl_enforcement - self.replication_role = replication_role - self.tags = tags diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/sku.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/sku.py deleted file mode 100644 index 3652595b01c2..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/sku.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 msrest.serialization import Model - - -class Sku(Model): - """Billing information related properties of a server. - - :param name: The name of the sku, typically, tier + family + cores, e.g. - B_Gen4_1, GP_Gen5_8. - :type name: str - :param tier: The tier of the particular SKU, e.g. Basic. Possible values - include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mariadb.models.SkuTier - :param capacity: The scale up/out capacity, representing server's compute - units. - :type capacity: int - :param size: The size code, to be interpreted by resource as appropriate. - :type size: str - :param family: The family of hardware. - :type family: str - """ - - _validation = { - 'capacity': {'minimum': 0}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/sku_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/sku_py3.py deleted file mode 100644 index 04332a36f924..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/sku_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 msrest.serialization import Model - - -class Sku(Model): - """Billing information related properties of a server. - - :param name: The name of the sku, typically, tier + family + cores, e.g. - B_Gen4_1, GP_Gen5_8. - :type name: str - :param tier: The tier of the particular SKU, e.g. Basic. Possible values - include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - :type tier: str or ~azure.mgmt.rdbms.mariadb.models.SkuTier - :param capacity: The scale up/out capacity, representing server's compute - units. - :type capacity: int - :param size: The size code, to be interpreted by resource as appropriate. - :type size: str - :param family: The family of hardware. - :type family: str - """ - - _validation = { - 'capacity': {'minimum': 0}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, tier=None, capacity: int=None, size: str=None, family: str=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - self.size = size - self.family = family diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/storage_profile.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/storage_profile.py deleted file mode 100644 index 79fddd2a0c15..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/storage_profile.py +++ /dev/null @@ -1,44 +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 StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param geo_redundant_backup: Enable Geo-redundant or not for server - backup. Possible values include: 'Enabled', 'Disabled' - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.mariadb.models.GeoRedundantBackup - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mariadb.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = kwargs.get('backup_retention_days', None) - self.geo_redundant_backup = kwargs.get('geo_redundant_backup', None) - self.storage_mb = kwargs.get('storage_mb', None) - self.storage_autogrow = kwargs.get('storage_autogrow', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/storage_profile_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/storage_profile_py3.py deleted file mode 100644 index a38cb348e932..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/storage_profile_py3.py +++ /dev/null @@ -1,44 +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 StorageProfile(Model): - """Storage Profile properties of a server. - - :param backup_retention_days: Backup retention days for the server. - :type backup_retention_days: int - :param geo_redundant_backup: Enable Geo-redundant or not for server - backup. Possible values include: 'Enabled', 'Disabled' - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.mariadb.models.GeoRedundantBackup - :param storage_mb: Max storage allowed for a server. - :type storage_mb: int - :param storage_autogrow: Enable Storage Auto Grow. Possible values - include: 'Enabled', 'Disabled' - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mariadb.models.StorageAutogrow - """ - - _attribute_map = { - 'backup_retention_days': {'key': 'backupRetentionDays', 'type': 'int'}, - 'geo_redundant_backup': {'key': 'geoRedundantBackup', 'type': 'str'}, - 'storage_mb': {'key': 'storageMB', 'type': 'int'}, - 'storage_autogrow': {'key': 'storageAutogrow', 'type': 'str'}, - } - - def __init__(self, *, backup_retention_days: int=None, geo_redundant_backup=None, storage_mb: int=None, storage_autogrow=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.backup_retention_days = backup_retention_days - self.geo_redundant_backup = geo_redundant_backup - self.storage_mb = storage_mb - self.storage_autogrow = storage_autogrow diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/tracked_resource.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/tracked_resource.py deleted file mode 100644 index 67e93dd79e77..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/tracked_resource.py +++ /dev/null @@ -1,53 +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 .proxy_resource import ProxyResource - - -class TrackedResource(ProxyResource): - """Resource properties including location and tags for track resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/tracked_resource_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/tracked_resource_py3.py deleted file mode 100644 index 0fbc3cc3edc9..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +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 .proxy_resource_py3 import ProxyResource - - -class TrackedResource(ProxyResource): - """Resource properties including location and tags for track resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Required. The location the resource resides in. - :type location: str - :param tags: Application-specific metadata in the form of key-value pairs. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/virtual_network_rule.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/virtual_network_rule.py deleted file mode 100644 index 8746b864bbd7..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/virtual_network_rule.py +++ /dev/null @@ -1,62 +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 .proxy_resource import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or - ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) - self.state = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/virtual_network_rule_paged.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/virtual_network_rule_paged.py deleted file mode 100644 index c590c551cebe..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/virtual_network_rule_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 VirtualNetworkRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`VirtualNetworkRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} - } - - def __init__(self, *args, **kwargs): - - super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/virtual_network_rule_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/virtual_network_rule_py3.py deleted file mode 100644 index 5cf92b6b2928..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,62 +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 .proxy_resource_py3 import ProxyResource - - -class VirtualNetworkRule(ProxyResource): - """A virtual network rule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param virtual_network_subnet_id: Required. The ARM resource id of the - virtual network subnet. - :type virtual_network_subnet_id: str - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - :ivar state: Virtual Network Rule State. Possible values include: - 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - :vartype state: str or - ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_subnet_id': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__(self, *, virtual_network_subnet_id: str, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.virtual_network_subnet_id = virtual_network_subnet_id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint - self.state = None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/__init__.py index ba9e371e6e75..133208b9f021 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/__init__.py @@ -9,17 +9,27 @@ # regenerated. # -------------------------------------------------------------------------- -from .servers_operations import ServersOperations -from .replicas_operations import ReplicasOperations -from .firewall_rules_operations import FirewallRulesOperations -from .virtual_network_rules_operations import VirtualNetworkRulesOperations -from .databases_operations import DatabasesOperations -from .configurations_operations import ConfigurationsOperations -from .log_files_operations import LogFilesOperations -from .location_based_performance_tier_operations import LocationBasedPerformanceTierOperations -from .check_name_availability_operations import CheckNameAvailabilityOperations -from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations -from .operations import Operations +from ._servers_operations import ServersOperations +from ._replicas_operations import ReplicasOperations +from ._firewall_rules_operations import FirewallRulesOperations +from ._virtual_network_rules_operations import VirtualNetworkRulesOperations +from ._databases_operations import DatabasesOperations +from ._configurations_operations import ConfigurationsOperations +from ._log_files_operations import LogFilesOperations +from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations +from ._check_name_availability_operations import CheckNameAvailabilityOperations +from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations +from ._operations import Operations +from ._query_texts_operations import QueryTextsOperations +from ._top_query_statistics_operations import TopQueryStatisticsOperations +from ._wait_statistics_operations import WaitStatisticsOperations +from ._advisors_operations import AdvisorsOperations +from ._recommended_actions_operations import RecommendedActionsOperations +from ._location_based_recommended_action_sessions_operation_status_operations import LocationBasedRecommendedActionSessionsOperationStatusOperations +from ._location_based_recommended_action_sessions_result_operations import LocationBasedRecommendedActionSessionsResultOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._maria_db_management_client_operations import MariaDBManagementClientOperationsMixin __all__ = [ 'ServersOperations', @@ -33,4 +43,14 @@ 'CheckNameAvailabilityOperations', 'ServerSecurityAlertPoliciesOperations', 'Operations', + 'QueryTextsOperations', + 'TopQueryStatisticsOperations', + 'WaitStatisticsOperations', + 'AdvisorsOperations', + 'RecommendedActionsOperations', + 'LocationBasedRecommendedActionSessionsOperationStatusOperations', + 'LocationBasedRecommendedActionSessionsResultOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'MariaDBManagementClientOperationsMixin', ] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_advisors_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_advisors_operations.py new file mode 100644 index 000000000000..c01041b20ac1 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_advisors_operations.py @@ -0,0 +1,178 @@ +# 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 AdvisorsOperations(object): + """AdvisorsOperations 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 API version to use for this operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, resource_group_name, server_name, advisor_name, custom_headers=None, raw=False, **operation_config): + """Get a recommendation action advisor. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param advisor_name: The advisor name for recommendation action. + :type advisor_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: Advisor or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mariadb.models.Advisor or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'advisorName': self._serialize.url("advisor_name", advisor_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', min_length=1) + + # 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]: + 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('Advisor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """List recommendation action advisors. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_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: An iterator like instance of Advisor + :rtype: + ~azure.mgmt.rdbms.mariadb.models.AdvisorPaged[~azure.mgmt.rdbms.mariadb.models.Advisor] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_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', min_length=1) + + 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.AdvisorPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_check_name_availability_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/check_name_availability_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_check_name_availability_operations.py index 49a6fa792057..eb2470c52538 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_check_name_availability_operations.py @@ -19,11 +19,13 @@ class CheckNameAvailabilityOperations(object): """CheckNameAvailabilityOperations 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 API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -60,13 +62,13 @@ def execute( # Construct URL url = self.execute.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } 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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -92,7 +94,6 @@ def execute( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NameAvailability', response) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_configurations_operations.py similarity index 90% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/configurations_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_configurations_operations.py index 673aaa800ad9..58075428f2bb 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_configurations_operations.py @@ -21,11 +21,13 @@ 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. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -47,8 +49,8 @@ def _create_or_update_initial( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') } @@ -56,7 +58,7 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -96,9 +98,8 @@ def create_or_update( self, resource_group_name, server_name, configuration_name, value=None, source=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a configuration of a server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -154,9 +155,8 @@ def get( self, resource_group_name, server_name, configuration_name, custom_headers=None, raw=False, **operation_config): """Gets information about a configuration of server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -175,8 +175,8 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') } @@ -184,7 +184,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -206,7 +206,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Configuration', response) @@ -221,9 +220,8 @@ def list_by_server( self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): """List all the configurations in a given server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -237,21 +235,20 @@ def list_by_server( ~azure.mgmt.rdbms.mariadb.models.ConfigurationPaged[~azure.mgmt.rdbms.mariadb.models.Configuration] :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_server.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -269,6 +266,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]: @@ -279,12 +281,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/configurations'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_databases_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/databases_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_databases_operations.py index b3f1103729e0..3b505dae5d13 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/databases_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_databases_operations.py @@ -21,11 +21,13 @@ class DatabasesOperations(object): """DatabasesOperations 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 API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -47,8 +49,8 @@ def _create_or_update_initial( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } @@ -56,7 +58,7 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -98,9 +100,8 @@ def create_or_update( self, resource_group_name, server_name, database_name, charset=None, collation=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new database or updates an existing database. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -158,8 +159,8 @@ def _delete_initial( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } @@ -167,7 +168,7 @@ def _delete_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -195,9 +196,8 @@ def delete( self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a database. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -241,9 +241,8 @@ def get( self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): """Gets information about a database. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -262,8 +261,8 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } @@ -271,7 +270,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -293,7 +292,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Database', response) @@ -308,9 +306,8 @@ def list_by_server( self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): """List all the databases in a given server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -324,21 +321,20 @@ def list_by_server( ~azure.mgmt.rdbms.mariadb.models.DatabasePaged[~azure.mgmt.rdbms.mariadb.models.Database] :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_server.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -356,6 +352,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]: @@ -366,12 +367,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/databases'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_firewall_rules_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/firewall_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_firewall_rules_operations.py index 994e8efc8b87..f850bc4c9dce 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_firewall_rules_operations.py @@ -21,11 +21,13 @@ class FirewallRulesOperations(object): """FirewallRulesOperations 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 API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -47,8 +49,8 @@ def _create_or_update_initial( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') } @@ -56,7 +58,7 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -98,9 +100,8 @@ def create_or_update( self, resource_group_name, server_name, firewall_rule_name, start_ip_address, end_ip_address, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new firewall rule or updates an existing firewall rule. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -160,8 +161,8 @@ def _delete_initial( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') } @@ -169,7 +170,7 @@ def _delete_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -197,9 +198,8 @@ def delete( self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a server firewall rule. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -243,9 +243,8 @@ def get( self, resource_group_name, server_name, firewall_rule_name, custom_headers=None, raw=False, **operation_config): """Gets information about a server firewall rule. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -264,8 +263,8 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'firewallRuleName': self._serialize.url("firewall_rule_name", firewall_rule_name, 'str') } @@ -273,7 +272,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -295,7 +294,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('FirewallRule', response) @@ -310,9 +308,8 @@ def list_by_server( self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): """List all the firewall rules in a given server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -326,21 +323,20 @@ def list_by_server( ~azure.mgmt.rdbms.mariadb.models.FirewallRulePaged[~azure.mgmt.rdbms.mariadb.models.FirewallRule] :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_server.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -358,6 +354,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]: @@ -368,12 +369,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.FirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/firewallRules'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/location_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_performance_tier_operations.py similarity index 86% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/location_based_performance_tier_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_performance_tier_operations.py index f9018d7d51c2..45fc4fd7599d 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/location_based_performance_tier_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_performance_tier_operations.py @@ -19,11 +19,13 @@ class LocationBasedPerformanceTierOperations(object): """LocationBasedPerformanceTierOperations 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 API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -54,20 +56,19 @@ def list( ~azure.mgmt.rdbms.mariadb.models.PerformanceTierPropertiesPaged[~azure.mgmt.rdbms.mariadb.models.PerformanceTierProperties] :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'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'locationName': self._serialize.url("location_name", location_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -85,6 +86,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]: @@ -95,12 +101,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PerformanceTierPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/performanceTiers'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py new file mode 100644 index 000000000000..5705108d5868 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py @@ -0,0 +1,103 @@ +# 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 LocationBasedRecommendedActionSessionsOperationStatusOperations(object): + """LocationBasedRecommendedActionSessionsOperationStatusOperations 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 API version to use for this operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, location_name, operation_id, custom_headers=None, raw=False, **operation_config): + """Recommendation action session operation status. + + :param location_name: The name of the location. + :type location_name: str + :param operation_id: The operation identifier. + :type operation_id: 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: RecommendedActionSessionsOperationStatus or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.rdbms.mariadb.models.RecommendedActionSessionsOperationStatus + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, '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', min_length=1) + + # 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]: + 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('RecommendedActionSessionsOperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/recommendedActionSessionsAzureAsyncOperation/{operationId}'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py new file mode 100644 index 000000000000..35e93df18e6b --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py @@ -0,0 +1,112 @@ +# 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 LocationBasedRecommendedActionSessionsResultOperations(object): + """LocationBasedRecommendedActionSessionsResultOperations 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 API version to use for this operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list( + self, location_name, operation_id, custom_headers=None, raw=False, **operation_config): + """Recommendation action session operation result. + + :param location_name: The name of the location. + :type location_name: str + :param operation_id: The operation identifier. + :type operation_id: 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: An iterator like instance of RecommendationAction + :rtype: + ~azure.mgmt.rdbms.mariadb.models.RecommendationActionPaged[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, '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', min_length=1) + + 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, 201]: + 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.RecommendationActionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/recommendedActionSessionsOperationResults/{operationId}'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/log_files_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_log_files_operations.py similarity index 84% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/log_files_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_log_files_operations.py index d24b5db3ae3e..b1535b9af883 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/log_files_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_log_files_operations.py @@ -19,11 +19,13 @@ class LogFilesOperations(object): """LogFilesOperations 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 API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -41,9 +43,8 @@ def list_by_server( self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): """List all the log files in a given server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -57,21 +58,20 @@ def list_by_server( ~azure.mgmt.rdbms.mariadb.models.LogFilePaged[~azure.mgmt.rdbms.mariadb.models.LogFile] :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_server.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -89,6 +89,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]: @@ -99,12 +104,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LogFilePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LogFilePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LogFilePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/logFiles'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_maria_db_management_client_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_maria_db_management_client_operations.py new file mode 100644 index 000000000000..3e6ba7ee7c8d --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_maria_db_management_client_operations.py @@ -0,0 +1,108 @@ +# 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.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +from .. import models +import uuid + + +class MariaDBManagementClientOperationsMixin(object): + + + def _create_recommended_action_session_initial( + self, resource_group_name, server_name, advisor_name, database_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_recommended_action_session.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'advisorName': self._serialize.url("advisor_name", advisor_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', min_length=1) + query_parameters['databaseName'] = self._serialize.query("database_name", database_name, 'str') + + # Construct headers + header_parameters = {} + 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.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def create_recommended_action_session( + self, resource_group_name, server_name, advisor_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create recommendation action session for the advisor. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param advisor_name: The advisor name for recommendation action. + :type advisor_name: str + :param database_name: The name of the database. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._create_recommended_action_session_initial( + resource_group_name=resource_group_name, + server_name=server_name, + advisor_name=advisor_name, + database_name=database_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_recommended_action_session.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_operations.py index e95866edd683..32156690b2d5 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_operations.py @@ -19,11 +19,13 @@ 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. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -56,7 +58,7 @@ def list( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -78,7 +80,6 @@ def list( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('OperationListResult', response) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_endpoint_connections_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..fef5551ccfe1 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,490 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations 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 API version to use for this operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """Gets a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection. + :type private_endpoint_connection_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: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + 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', min_length=1) + + # 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]: + 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('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + 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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + 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('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param private_endpoint: Private endpoint which the connection belongs + to. + :type private_endpoint: + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateProperty + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PrivateEndpointConnection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint=private_endpoint, + private_link_service_connection_state=private_link_service_connection_state, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_initial( + self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + 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', min_length=1) + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, server_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _update_tags_initial( + self, resource_group_name, server_name, private_endpoint_connection_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.TagsObject(tags=tags) + + # Construct URL + url = self.update_tags.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'TagsObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + 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 + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_tags( + self, resource_group_name, server_name, private_endpoint_connection_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates tags on private endpoint connection. + + Updates private endpoint connection with the specified tags. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param private_endpoint_connection_name: + :type private_endpoint_connection_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PrivateEndpointConnection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection]] + :raises: :class:`CloudError` + """ + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + server_name=server_name, + private_endpoint_connection_name=private_endpoint_connection_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets all private endpoint connections on a server. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_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: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnectionPaged[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + 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', min_length=1) + + 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.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_link_resources_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..6abd192ce35a --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_link_resources_operations.py @@ -0,0 +1,178 @@ +# 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 PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations 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 API version to use for this operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets the private link resources for MariaDB server. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_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: An iterator like instance of PrivateLinkResource + :rtype: + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourcePaged[~azure.mgmt.rdbms.mariadb.models.PrivateLinkResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + 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', min_length=1) + + 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.PrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateLinkResources'} + + def get( + self, resource_group_name, server_name, group_name, custom_headers=None, raw=False, **operation_config): + """Gets a private link resource for MariaDB server. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param group_name: The name of the private link resource. + :type group_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: PrivateLinkResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + 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', min_length=1) + + # 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]: + 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('PrivateLinkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateLinkResources/{groupName}'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_query_texts_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_query_texts_operations.py new file mode 100644 index 000000000000..6504c404733a --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_query_texts_operations.py @@ -0,0 +1,181 @@ +# 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 QueryTextsOperations(object): + """QueryTextsOperations 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 API version to use for this operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, resource_group_name, server_name, query_id, custom_headers=None, raw=False, **operation_config): + """Retrieve the Query-Store query texts for the queryId. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param query_id: The Query-Store query identifier. + :type query_id: 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: QueryText or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryText or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'queryId': self._serialize.url("query_id", query_id, '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', min_length=1) + + # 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]: + 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('QueryText', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/queryTexts/{queryId}'} + + def list_by_server( + self, resource_group_name, server_name, query_ids, custom_headers=None, raw=False, **operation_config): + """Retrieve the Query-Store query texts for specified queryIds. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param query_ids: The query identifiers + :type query_ids: list[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: An iterator like instance of QueryText + :rtype: + ~azure.mgmt.rdbms.mariadb.models.QueryTextPaged[~azure.mgmt.rdbms.mariadb.models.QueryText] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_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', min_length=1) + query_parameters['queryIds'] = self._serialize.query("query_ids", query_ids, '[str]', div=',') + + 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.QueryTextPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/queryTexts'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recommended_actions_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recommended_actions_operations.py new file mode 100644 index 000000000000..697511db74f1 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recommended_actions_operations.py @@ -0,0 +1,188 @@ +# 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 RecommendedActionsOperations(object): + """RecommendedActionsOperations 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 API version to use for this operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, resource_group_name, server_name, advisor_name, recommended_action_name, custom_headers=None, raw=False, **operation_config): + """Retrieve recommended actions from the advisor. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param advisor_name: The advisor name for recommendation action. + :type advisor_name: str + :param recommended_action_name: The recommended action name. + :type recommended_action_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: RecommendationAction or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mariadb.models.RecommendationAction or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'advisorName': self._serialize.url("advisor_name", advisor_name, 'str'), + 'recommendedActionName': self._serialize.url("recommended_action_name", recommended_action_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', min_length=1) + + # 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]: + 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('RecommendationAction', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}'} + + def list_by_server( + self, resource_group_name, server_name, advisor_name, session_id=None, custom_headers=None, raw=False, **operation_config): + """Retrieve recommended actions from the advisor. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param advisor_name: The advisor name for recommendation action. + :type advisor_name: str + :param session_id: The recommendation action session identifier. + :type session_id: 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: An iterator like instance of RecommendationAction + :rtype: + ~azure.mgmt.rdbms.mariadb.models.RecommendationActionPaged[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'advisorName': self._serialize.url("advisor_name", advisor_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', min_length=1) + if session_id is not None: + query_parameters['sessionId'] = self._serialize.query("session_id", session_id, '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.RecommendationActionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/recommendedActions'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/replicas_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_replicas_operations.py similarity index 84% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/replicas_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_replicas_operations.py index 97c481832264..9325589c03f0 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/replicas_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_replicas_operations.py @@ -19,11 +19,13 @@ class ReplicasOperations(object): """ReplicasOperations 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 API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -41,9 +43,8 @@ def list_by_server( self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): """List all the replicas for a given server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -57,21 +58,20 @@ def list_by_server( ~azure.mgmt.rdbms.mariadb.models.ServerPaged[~azure.mgmt.rdbms.mariadb.models.Server] :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_server.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -89,6 +89,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]: @@ -99,12 +104,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/replicas'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/server_security_alert_policies_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py similarity index 92% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/server_security_alert_policies_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py index b64f1422f9ca..1216113810df 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/server_security_alert_policies_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py @@ -21,12 +21,14 @@ class ServerSecurityAlertPoliciesOperations(object): """ServerSecurityAlertPoliciesOperations 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 security_alert_policy_name: The name of the security alert policy. Constant value: "Default". - :ivar api_version: The API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -45,9 +47,8 @@ def get( self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): """Get a server's security alert policy. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -64,16 +65,16 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } 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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -95,7 +96,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ServerSecurityAlertPolicy', response) @@ -112,16 +112,16 @@ def _create_or_update_initial( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } 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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -161,9 +161,8 @@ def create_or_update( self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a threat detection policy. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_servers_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/servers_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_servers_operations.py index 43199554e5f6..cf283f73edac 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_servers_operations.py @@ -21,11 +21,13 @@ class ServersOperations(object): """ServersOperations 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 API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -45,15 +47,15 @@ def _create_initial( # Construct URL url = self.create.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -96,9 +98,8 @@ def create( """Creates a new server or updates an existing server. The update action will overwrite the existing server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -151,15 +152,15 @@ def _update_initial( # Construct URL url = self.update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -200,9 +201,8 @@ def update( """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -255,15 +255,15 @@ def _delete_initial( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -291,9 +291,8 @@ def delete( self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -334,9 +333,8 @@ def get( self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): """Gets information about a server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -353,15 +351,15 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -383,7 +381,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Server', response) @@ -398,9 +395,8 @@ def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """List all the servers in a given resource group. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -412,20 +408,19 @@ def list_by_resource_group( ~azure.mgmt.rdbms.mariadb.models.ServerPaged[~azure.mgmt.rdbms.mariadb.models.Server] :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'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } 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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -443,6 +438,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]: @@ -453,12 +453,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers'} @@ -477,19 +475,18 @@ def list( ~azure.mgmt.rdbms.mariadb.models.ServerPaged[~azure.mgmt.rdbms.mariadb.models.Server] :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'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } 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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -507,6 +504,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]: @@ -517,12 +519,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ServerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/servers'} @@ -533,15 +533,15 @@ def _restart_initial( # Construct URL url = self.restart.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -569,9 +569,8 @@ def restart( self, resource_group_name, server_name, custom_headers=None, raw=False, polling=True, **operation_config): """Restarts a server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_top_query_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_top_query_statistics_operations.py new file mode 100644 index 000000000000..33898844fedd --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_top_query_statistics_operations.py @@ -0,0 +1,187 @@ +# 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 TopQueryStatisticsOperations(object): + """TopQueryStatisticsOperations 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 API version to use for this operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, resource_group_name, server_name, query_statistic_id, custom_headers=None, raw=False, **operation_config): + """Retrieve the query statistic for specified identifier. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param query_statistic_id: The Query Statistic identifier. + :type query_statistic_id: 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: QueryStatistic or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryStatistic or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'queryStatisticId': self._serialize.url("query_statistic_id", query_statistic_id, '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', min_length=1) + + # 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]: + 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('QueryStatistic', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/topQueryStatistics/{queryStatisticId}'} + + def list_by_server( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + """Retrieve the Query-Store top queries for specified metric and + aggregation. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param parameters: The required parameters for retrieving top query + statistics. + :type parameters: + ~azure.mgmt.rdbms.mariadb.models.TopQueryStatisticsInput + :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 QueryStatistic + :rtype: + ~azure.mgmt.rdbms.mariadb.models.QueryStatisticPaged[~azure.mgmt.rdbms.mariadb.models.QueryStatistic] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_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', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'TopQueryStatisticsInput') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters, body_content) + 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.QueryStatisticPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/topQueryStatistics'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/virtual_network_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_virtual_network_rules_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/virtual_network_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_virtual_network_rules_operations.py index c0cc9838635e..1a6bd6bfbd41 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/virtual_network_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_virtual_network_rules_operations.py @@ -21,11 +21,13 @@ class VirtualNetworkRulesOperations(object): """VirtualNetworkRulesOperations 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 API version to use for the request. Constant value: "2018-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2018-06-01". """ models = models @@ -43,9 +45,8 @@ def get( self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): """Gets a virtual network rule. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -65,16 +66,16 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -96,7 +97,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VirtualNetworkRule', response) @@ -115,16 +115,16 @@ def _create_or_update_initial( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -166,9 +166,8 @@ def create_or_update( self, resource_group_name, server_name, virtual_network_rule_name, virtual_network_subnet_id, ignore_missing_vnet_service_endpoint=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates an existing virtual network rule. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -229,16 +228,16 @@ def _delete_initial( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } 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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -266,9 +265,8 @@ def delete( self, resource_group_name, server_name, virtual_network_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the virtual network rule with the given name. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -313,9 +311,8 @@ def list_by_server( self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): """Gets a list of virtual network rules in a server. - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param server_name: The name of the server. :type server_name: str @@ -329,21 +326,20 @@ def list_by_server( ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRulePaged[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule] :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_server.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } 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') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -361,6 +357,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]: @@ -371,12 +372,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/virtualNetworkRules'} diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_wait_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_wait_statistics_operations.py new file mode 100644 index 000000000000..1c58e6e42ca4 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_wait_statistics_operations.py @@ -0,0 +1,185 @@ +# 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 WaitStatisticsOperations(object): + """WaitStatisticsOperations 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 API version to use for this operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, resource_group_name, server_name, wait_statistics_id, custom_headers=None, raw=False, **operation_config): + """Retrieve wait statistics for specified identifier. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param wait_statistics_id: The Wait Statistic identifier. + :type wait_statistics_id: 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: WaitStatistic or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.mariadb.models.WaitStatistic or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'waitStatisticsId': self._serialize.url("wait_statistics_id", wait_statistics_id, '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', min_length=1) + + # 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]: + 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('WaitStatistic', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/waitStatistics/{waitStatisticsId}'} + + def list_by_server( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + """Retrieve wait statistics for specified aggregation window. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param parameters: The required parameters for retrieving wait + statistics. + :type parameters: ~azure.mgmt.rdbms.mariadb.models.WaitStatisticsInput + :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 WaitStatistic + :rtype: + ~azure.mgmt.rdbms.mariadb.models.WaitStatisticPaged[~azure.mgmt.rdbms.mariadb.models.WaitStatistic] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_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', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'WaitStatisticsInput') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters, body_content) + 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.WaitStatisticPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/waitStatistics'}