From dd47be41055e867e5b1ef13644238310eb363510 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 13 Jul 2021 18:13:28 +0000 Subject: [PATCH] CodeGen from PR 15027 in Azure/azure-rest-api-specs Merge bf7e0abc6b9af1e2a3741a715c39c4281806dcdd into 7f3c678432df706220db21d8712d3b1bae6ae1a0 --- sdk/sql/azure-mgmt-sql/_meta.json | 2 +- .../azure/mgmt/sql/models/__init__.py | 3 -- .../azure/mgmt/sql/models/_models.py | 43 +------------------ .../azure/mgmt/sql/models/_models_py3.py | 43 +------------------ .../models/_sql_management_client_enums.py | 1 + 5 files changed, 4 insertions(+), 88 deletions(-) diff --git a/sdk/sql/azure-mgmt-sql/_meta.json b/sdk/sql/azure-mgmt-sql/_meta.json index 96a4952d7109..ff955be5aa74 100644 --- a/sdk/sql/azure-mgmt-sql/_meta.json +++ b/sdk/sql/azure-mgmt-sql/_meta.json @@ -1,7 +1,7 @@ { "autorest": "V2", "use": "@microsoft.azure/autorest.python@~4.0.71", - "commit": "a07f49e3f75a134c1acdacc338c9f9dc32386f66", + "commit": "0b540cc19c40416f320e4febf79c3bf2fccd682e", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/sql/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", "readme": "specification/sql/resource-manager/readme.md" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 03f512bd74e2..154429e14496 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -177,7 +177,6 @@ from ._models_py3 import ReplicationLink from ._models_py3 import Resource from ._models_py3 import ResourceIdentity - from ._models_py3 import ResourceIdentityWithUserAssignedIdentities from ._models_py3 import ResourceMoveDefinition from ._models_py3 import ResourceWithWritableName from ._models_py3 import RestorableDroppedDatabase @@ -420,7 +419,6 @@ from ._models import ReplicationLink from ._models import Resource from ._models import ResourceIdentity - from ._models import ResourceIdentityWithUserAssignedIdentities from ._models import ResourceMoveDefinition from ._models import ResourceWithWritableName from ._models import RestorableDroppedDatabase @@ -876,7 +874,6 @@ 'ReplicationLink', 'Resource', 'ResourceIdentity', - 'ResourceIdentityWithUserAssignedIdentities', 'ResourceMoveDefinition', 'ResourceWithWritableName', 'RestorableDroppedDatabase', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py index 748bcffaad01..cd4b947e01e6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -9452,7 +9452,7 @@ class ResourceIdentity(Model): :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'None', 'SystemAssigned', - 'UserAssigned' + 'UserAssigned', 'SystemAssigned,UserAssigned' :type type: str or ~azure.mgmt.sql.models.IdentityType :ivar tenant_id: The Azure Active Directory tenant id. :vartype tenant_id: str @@ -9478,47 +9478,6 @@ def __init__(self, **kwargs): self.tenant_id = None -class ResourceIdentityWithUserAssignedIdentities(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param user_assigned_identities: The resource ids of the user assigned - identities to use - :type user_assigned_identities: dict[str, - ~azure.mgmt.sql.models.UserIdentity] - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'None', 'SystemAssigned', - 'UserAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentity}'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentityWithUserAssignedIdentities, self).__init__(**kwargs) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - self.principal_id = None - self.type = kwargs.get('type', None) - self.tenant_id = None - - class ResourceMoveDefinition(Model): """Contains the information necessary to perform a resource move (rename). diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py index e2d70a7c54a0..739e905f130f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -9452,7 +9452,7 @@ class ResourceIdentity(Model): :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'None', 'SystemAssigned', - 'UserAssigned' + 'UserAssigned', 'SystemAssigned,UserAssigned' :type type: str or ~azure.mgmt.sql.models.IdentityType :ivar tenant_id: The Azure Active Directory tenant id. :vartype tenant_id: str @@ -9478,47 +9478,6 @@ def __init__(self, *, user_assigned_identities=None, type=None, **kwargs) -> Non self.tenant_id = None -class ResourceIdentityWithUserAssignedIdentities(Model): - """Azure Active Directory identity configuration for a resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param user_assigned_identities: The resource ids of the user assigned - identities to use - :type user_assigned_identities: dict[str, - ~azure.mgmt.sql.models.UserIdentity] - :ivar principal_id: The Azure Active Directory principal id. - :vartype principal_id: str - :param type: The identity type. Set this to 'SystemAssigned' in order to - automatically create and assign an Azure Active Directory principal for - the resource. Possible values include: 'None', 'SystemAssigned', - 'UserAssigned' - :type type: str or ~azure.mgmt.sql.models.IdentityType - :ivar tenant_id: The Azure Active Directory tenant id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentity}'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, user_assigned_identities=None, type=None, **kwargs) -> None: - super(ResourceIdentityWithUserAssignedIdentities, self).__init__(**kwargs) - self.user_assigned_identities = user_assigned_identities - self.principal_id = None - self.type = type - self.tenant_id = None - - class ResourceMoveDefinition(Model): """Contains the information necessary to perform a resource move (rename). diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index fd0a32374104..acfac7ee17ab 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -610,6 +610,7 @@ class IdentityType(str, Enum): none = "None" system_assigned = "SystemAssigned" user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned,UserAssigned" class ManagedServerCreateMode(str, Enum):