Skip to content

Commit

Permalink
Generated from 2d907187fe72f27d63bbae655e4e1ae7c9ec70be
Browse files Browse the repository at this point in the history
Suppress OperationsApiResponseSchema for LintDiff
  • Loading branch information
SDK Automation committed Aug 7, 2020
1 parent 11a57d5 commit 2bd338e
Show file tree
Hide file tree
Showing 10 changed files with 404 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from .operations import ServerAdministratorsOperations
from .operations import LocationBasedPerformanceTierOperations
from .operations import CheckNameAvailabilityOperations
from .operations import ServerSecurityAlertPoliciesOperations
from .operations import Operations
from .operations import QueryTextsOperations
from .operations import TopQueryStatisticsOperations
Expand All @@ -36,6 +35,7 @@
from .operations import PrivateEndpointConnectionsOperations
from .operations import PrivateLinkResourcesOperations
from .operations import ServerKeysOperations
from .operations import ServerSecurityAlertPoliciesOperations
from . import models


Expand Down Expand Up @@ -65,8 +65,6 @@ class MySQLManagementClient(MySQLManagementClientOperationsMixin, SDKClient):
:vartype location_based_performance_tier: azure.mgmt.rdbms.mysql.operations.LocationBasedPerformanceTierOperations
:ivar check_name_availability: CheckNameAvailability operations
:vartype check_name_availability: azure.mgmt.rdbms.mysql.operations.CheckNameAvailabilityOperations
:ivar server_security_alert_policies: ServerSecurityAlertPolicies operations
:vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.operations.ServerSecurityAlertPoliciesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.rdbms.mysql.operations.Operations
:ivar query_texts: QueryTexts operations
Expand All @@ -89,6 +87,8 @@ class MySQLManagementClient(MySQLManagementClientOperationsMixin, SDKClient):
:vartype private_link_resources: azure.mgmt.rdbms.mysql.operations.PrivateLinkResourcesOperations
:ivar server_keys: ServerKeys operations
:vartype server_keys: azure.mgmt.rdbms.mysql.operations.ServerKeysOperations
:ivar server_security_alert_policies: ServerSecurityAlertPolicies operations
:vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.operations.ServerSecurityAlertPoliciesOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -128,8 +128,6 @@ def __init__(
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(
Expand All @@ -152,3 +150,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.server_keys = ServerKeysOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
from ._models_py3 import ServerUpdateParameters
from ._models_py3 import Sku
from ._models_py3 import StorageProfile
from ._models_py3 import SystemData
from ._models_py3 import TagsObject
from ._models_py3 import TopQueryStatisticsInput
from ._models_py3 import TrackedResource
Expand Down Expand Up @@ -105,6 +106,7 @@
from ._models import ServerUpdateParameters
from ._models import Sku
from ._models import StorageProfile
from ._models import SystemData
from ._models import TagsObject
from ._models import TopQueryStatisticsInput
from ._models import TrackedResource
Expand All @@ -125,6 +127,7 @@
from ._paged_models import ServerAdministratorResourcePaged
from ._paged_models import ServerKeyPaged
from ._paged_models import ServerPaged
from ._paged_models import ServerSecurityAlertPolicyPaged
from ._paged_models import VirtualNetworkRulePaged
from ._paged_models import WaitStatisticPaged
from ._my_sql_management_client_enums import (
Expand All @@ -144,6 +147,7 @@
VirtualNetworkRuleState,
OperationOrigin,
ServerSecurityAlertPolicyState,
CreatedByType,
)

__all__ = [
Expand Down Expand Up @@ -191,6 +195,7 @@
'ServerUpdateParameters',
'Sku',
'StorageProfile',
'SystemData',
'TagsObject',
'TopQueryStatisticsInput',
'TrackedResource',
Expand All @@ -213,6 +218,7 @@
'PrivateEndpointConnectionPaged',
'PrivateLinkResourcePaged',
'ServerKeyPaged',
'ServerSecurityAlertPolicyPaged',
'ServerVersion',
'SslEnforcementEnum',
'MinimalTlsVersionEnum',
Expand All @@ -229,4 +235,5 @@
'VirtualNetworkRuleState',
'OperationOrigin',
'ServerSecurityAlertPolicyState',
'CreatedByType',
]
80 changes: 47 additions & 33 deletions sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def __init__(self, **kwargs):
class CloudError(Model):
"""An error response from the Batch service.
:param error:
:param error: Error message
:type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse
"""

Expand Down Expand Up @@ -1864,57 +1864,30 @@ class ServerSecurityAlertPolicy(ProxyResource):
enabled or disabled. Possible values include: 'Enabled', 'Disabled'
:type state: str or
~azure.mgmt.rdbms.mysql.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
:ivar system_data:
:vartype system_data: ~azure.mgmt.rdbms.mysql.models.SystemData
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'state': {'required': True},
'system_data': {'readonly': 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'},
'system_data': {'key': 'systemData', 'type': 'SystemData'},
}

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)
self.system_data = None


class ServerUpdateParameters(Model):
Expand Down Expand Up @@ -2050,6 +2023,47 @@ def __init__(self, **kwargs):
self.storage_autogrow = kwargs.get('storage_autogrow', None)


class SystemData(Model):
"""Metadata pertaining to creation and last modification of the resource.
:param created_by: The identity that created the resource.
:type created_by: str
:param created_by_type: The type of identity that created the resource.
Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
:type created_by_type: str or ~azure.mgmt.rdbms.mysql.models.CreatedByType
:param created_at: The timestamp of resource creation (UTC).
:type created_at: datetime
:param last_modified_by: The identity that last modified the resource.
:type last_modified_by: str
:param last_modified_by_type: The type of identity that last modified the
resource. Possible values include: 'User', 'Application',
'ManagedIdentity', 'Key'
:type last_modified_by_type: str or
~azure.mgmt.rdbms.mysql.models.CreatedByType
:param last_modified_at: The type of identity that last modified the
resource.
:type last_modified_at: datetime
"""

_attribute_map = {
'created_by': {'key': 'createdBy', 'type': 'str'},
'created_by_type': {'key': 'createdByType', 'type': 'str'},
'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
}

def __init__(self, **kwargs):
super(SystemData, self).__init__(**kwargs)
self.created_by = kwargs.get('created_by', None)
self.created_by_type = kwargs.get('created_by_type', None)
self.created_at = kwargs.get('created_at', None)
self.last_modified_by = kwargs.get('last_modified_by', None)
self.last_modified_by_type = kwargs.get('last_modified_by_type', None)
self.last_modified_at = kwargs.get('last_modified_at', None)


class TagsObject(Model):
"""Tags object for patch operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def __init__(self, **kwargs) -> None:
class CloudError(Model):
"""An error response from the Batch service.
:param error:
:param error: Error message
:type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse
"""

Expand Down Expand Up @@ -1864,57 +1864,30 @@ class ServerSecurityAlertPolicy(ProxyResource):
enabled or disabled. Possible values include: 'Enabled', 'Disabled'
:type state: str or
~azure.mgmt.rdbms.mysql.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
:ivar system_data:
:vartype system_data: ~azure.mgmt.rdbms.mysql.models.SystemData
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'state': {'required': True},
'system_data': {'readonly': 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'},
'system_data': {'key': 'systemData', 'type': 'SystemData'},
}

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:
def __init__(self, *, state, **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
self.system_data = None


class ServerUpdateParameters(Model):
Expand Down Expand Up @@ -2050,6 +2023,47 @@ def __init__(self, *, backup_retention_days: int=None, geo_redundant_backup=None
self.storage_autogrow = storage_autogrow


class SystemData(Model):
"""Metadata pertaining to creation and last modification of the resource.
:param created_by: The identity that created the resource.
:type created_by: str
:param created_by_type: The type of identity that created the resource.
Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
:type created_by_type: str or ~azure.mgmt.rdbms.mysql.models.CreatedByType
:param created_at: The timestamp of resource creation (UTC).
:type created_at: datetime
:param last_modified_by: The identity that last modified the resource.
:type last_modified_by: str
:param last_modified_by_type: The type of identity that last modified the
resource. Possible values include: 'User', 'Application',
'ManagedIdentity', 'Key'
:type last_modified_by_type: str or
~azure.mgmt.rdbms.mysql.models.CreatedByType
:param last_modified_at: The type of identity that last modified the
resource.
:type last_modified_at: datetime
"""

_attribute_map = {
'created_by': {'key': 'createdBy', 'type': 'str'},
'created_by_type': {'key': 'createdByType', 'type': 'str'},
'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
}

def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None:
super(SystemData, self).__init__(**kwargs)
self.created_by = created_by
self.created_by_type = created_by_type
self.created_at = created_at
self.last_modified_by = last_modified_by
self.last_modified_by_type = last_modified_by_type
self.last_modified_at = last_modified_at


class TagsObject(Model):
"""Tags object for patch operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class MinimalTlsVersionEnum(str, Enum):

class InfrastructureEncryption(str, Enum):

enabled = "Enabled"
disabled = "Disabled"
enabled = "Enabled" #: Default value for single layer of encryption for data at rest.
disabled = "Disabled" #: Additional (2nd) layer of encryption for data at rest


class PublicNetworkAccessEnum(str, Enum):
Expand Down Expand Up @@ -119,3 +119,11 @@ class ServerSecurityAlertPolicyState(str, Enum):

enabled = "Enabled"
disabled = "Disabled"


class CreatedByType(str, Enum):

user = "User"
application = "Application"
managed_identity = "ManagedIdentity"
key = "Key"
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,16 @@ class ServerKeyPaged(Paged):
def __init__(self, *args, **kwargs):

super(ServerKeyPaged, self).__init__(*args, **kwargs)
class ServerSecurityAlertPolicyPaged(Paged):
"""
A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy <azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'}
}

def __init__(self, *args, **kwargs):

super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs)
Loading

0 comments on commit 2bd338e

Please sign in to comment.