|
| 1 | +# coding=utf-8 |
| 2 | +# -------------------------------------------------------------------------- |
| 3 | +# Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 | +# Licensed under the MIT License. See License.txt in the project root for |
| 5 | +# license information. |
| 6 | +# |
| 7 | +# Code generated by Microsoft (R) AutoRest Code Generator. |
| 8 | +# Changes may cause incorrect behavior and will be lost if the code is |
| 9 | +# regenerated. |
| 10 | +# -------------------------------------------------------------------------- |
| 11 | + |
| 12 | +from msrest.service_client import SDKClient |
| 13 | +from msrest import Serializer, Deserializer |
| 14 | +from msrestazure import AzureConfiguration |
| 15 | +from .version import VERSION |
| 16 | +from .operations.servers_operations import ServersOperations |
| 17 | +from .operations.firewall_rules_operations import FirewallRulesOperations |
| 18 | +from .operations.databases_operations import DatabasesOperations |
| 19 | +from .operations.configurations_operations import ConfigurationsOperations |
| 20 | +from .operations.log_files_operations import LogFilesOperations |
| 21 | +from .operations.location_based_performance_tier_operations import LocationBasedPerformanceTierOperations |
| 22 | +from .operations.check_name_availability_operations import CheckNameAvailabilityOperations |
| 23 | +from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations |
| 24 | +from .operations.operations import Operations |
| 25 | +from . import models |
| 26 | + |
| 27 | + |
| 28 | +class MariaDBManagementClientConfiguration(AzureConfiguration): |
| 29 | + """Configuration for MariaDBManagementClient |
| 30 | + Note that all parameters used to create this instance are saved as instance |
| 31 | + attributes. |
| 32 | +
|
| 33 | + :param credentials: Credentials needed for the client to connect to Azure. |
| 34 | + :type credentials: :mod:`A msrestazure Credentials |
| 35 | + object<msrestazure.azure_active_directory>` |
| 36 | + :param subscription_id: The subscription ID that identifies an Azure |
| 37 | + subscription. |
| 38 | + :type subscription_id: str |
| 39 | + :param str base_url: Service URL |
| 40 | + """ |
| 41 | + |
| 42 | + def __init__( |
| 43 | + self, credentials, subscription_id, base_url=None): |
| 44 | + |
| 45 | + if credentials is None: |
| 46 | + raise ValueError("Parameter 'credentials' must not be None.") |
| 47 | + if subscription_id is None: |
| 48 | + raise ValueError("Parameter 'subscription_id' must not be None.") |
| 49 | + if not base_url: |
| 50 | + base_url = 'https://management.azure.com' |
| 51 | + |
| 52 | + super(MariaDBManagementClientConfiguration, self).__init__(base_url) |
| 53 | + |
| 54 | + self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION)) |
| 55 | + self.add_user_agent('Azure-SDK-For-Python') |
| 56 | + |
| 57 | + self.credentials = credentials |
| 58 | + self.subscription_id = subscription_id |
| 59 | + |
| 60 | + |
| 61 | +class MariaDBManagementClient(SDKClient): |
| 62 | + """MariaDB Client |
| 63 | +
|
| 64 | + :ivar config: Configuration for client. |
| 65 | + :vartype config: MariaDBManagementClientConfiguration |
| 66 | +
|
| 67 | + :ivar servers: Servers operations |
| 68 | + :vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations |
| 69 | + :ivar firewall_rules: FirewallRules operations |
| 70 | + :vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations |
| 71 | + :ivar databases: Databases operations |
| 72 | + :vartype databases: azure.mgmt.rdbms.mariadb.operations.DatabasesOperations |
| 73 | + :ivar configurations: Configurations operations |
| 74 | + :vartype configurations: azure.mgmt.rdbms.mariadb.operations.ConfigurationsOperations |
| 75 | + :ivar log_files: LogFiles operations |
| 76 | + :vartype log_files: azure.mgmt.rdbms.mariadb.operations.LogFilesOperations |
| 77 | + :ivar location_based_performance_tier: LocationBasedPerformanceTier operations |
| 78 | + :vartype location_based_performance_tier: azure.mgmt.rdbms.mariadb.operations.LocationBasedPerformanceTierOperations |
| 79 | + :ivar check_name_availability: CheckNameAvailability operations |
| 80 | + :vartype check_name_availability: azure.mgmt.rdbms.mariadb.operations.CheckNameAvailabilityOperations |
| 81 | + :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations |
| 82 | + :vartype server_security_alert_policies: azure.mgmt.rdbms.mariadb.operations.ServerSecurityAlertPoliciesOperations |
| 83 | + :ivar operations: Operations operations |
| 84 | + :vartype operations: azure.mgmt.rdbms.mariadb.operations.Operations |
| 85 | +
|
| 86 | + :param credentials: Credentials needed for the client to connect to Azure. |
| 87 | + :type credentials: :mod:`A msrestazure Credentials |
| 88 | + object<msrestazure.azure_active_directory>` |
| 89 | + :param subscription_id: The subscription ID that identifies an Azure |
| 90 | + subscription. |
| 91 | + :type subscription_id: str |
| 92 | + :param str base_url: Service URL |
| 93 | + """ |
| 94 | + |
| 95 | + def __init__( |
| 96 | + self, credentials, subscription_id, base_url=None): |
| 97 | + |
| 98 | + self.config = MariaDBManagementClientConfiguration(credentials, subscription_id, base_url) |
| 99 | + super(MariaDBManagementClient, self).__init__(self.config.credentials, self.config) |
| 100 | + |
| 101 | + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} |
| 102 | + self.api_version = '2018-06-01-preview' |
| 103 | + self._serialize = Serializer(client_models) |
| 104 | + self._deserialize = Deserializer(client_models) |
| 105 | + |
| 106 | + self.servers = ServersOperations( |
| 107 | + self._client, self.config, self._serialize, self._deserialize) |
| 108 | + self.firewall_rules = FirewallRulesOperations( |
| 109 | + self._client, self.config, self._serialize, self._deserialize) |
| 110 | + self.databases = DatabasesOperations( |
| 111 | + self._client, self.config, self._serialize, self._deserialize) |
| 112 | + self.configurations = ConfigurationsOperations( |
| 113 | + self._client, self.config, self._serialize, self._deserialize) |
| 114 | + self.log_files = LogFilesOperations( |
| 115 | + self._client, self.config, self._serialize, self._deserialize) |
| 116 | + self.location_based_performance_tier = LocationBasedPerformanceTierOperations( |
| 117 | + self._client, self.config, self._serialize, self._deserialize) |
| 118 | + self.check_name_availability = CheckNameAvailabilityOperations( |
| 119 | + self._client, self.config, self._serialize, self._deserialize) |
| 120 | + self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( |
| 121 | + self._client, self.config, self._serialize, self._deserialize) |
| 122 | + self.operations = Operations( |
| 123 | + self._client, self.config, self._serialize, self._deserialize) |
0 commit comments