diff --git a/azure-mgmt-search/azure/mgmt/search/models/__init__.py b/azure-mgmt-search/azure/mgmt/search/models/__init__.py index 1fa43c85e74e..1ce1f9f90117 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/__init__.py +++ b/azure-mgmt-search/azure/mgmt/search/models/__init__.py @@ -16,6 +16,7 @@ from .query_key_py3 import QueryKey from .sku_py3 import Sku from .search_service_py3 import SearchService + from .identity_py3 import Identity from .resource_py3 import Resource from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation @@ -27,6 +28,7 @@ from .query_key import QueryKey from .sku import Sku from .search_service import SearchService + from .identity import Identity from .resource import Resource from .operation_display import OperationDisplay from .operation import Operation @@ -50,6 +52,7 @@ 'QueryKey', 'Sku', 'SearchService', + 'Identity', 'Resource', 'OperationDisplay', 'Operation', diff --git a/azure-mgmt-search/azure/mgmt/search/models/identity.py b/azure-mgmt-search/azure/mgmt/search/models/identity.py new file mode 100644 index 000000000000..f526b986fc70 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/identity.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 msrest.serialization import Model + + +class Identity(Model): + """Identity for the 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 principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: Required. The identity type. Default value: "SystemAssigned" . + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py b/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py new file mode 100644 index 000000000000..22d25fdd85b7 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/identity_py3.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 msrest.serialization import Model + + +class Identity(Model): + """Identity for the 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 principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: Required. The identity type. Default value: "SystemAssigned" . + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/resource.py b/azure-mgmt-search/azure/mgmt/search/models/resource.py index 718a54f2e59b..8dc5dd8833f9 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/resource.py +++ b/azure-mgmt-search/azure/mgmt/search/models/resource.py @@ -32,6 +32,8 @@ class Resource(Model): :type location: str :param tags: Tags to help categorize the resource in the Azure portal. :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity """ _validation = { @@ -46,6 +48,7 @@ class Resource(Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, } def __init__(self, **kwargs): @@ -55,3 +58,4 @@ def __init__(self, **kwargs): self.type = None self.location = kwargs.get('location', None) self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py b/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py index 0f2e04e0d9cc..752e7a2cbbb9 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py +++ b/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py @@ -32,6 +32,8 @@ class Resource(Model): :type location: str :param tags: Tags to help categorize the resource in the Azure portal. :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity """ _validation = { @@ -46,12 +48,14 @@ class Resource(Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, } - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None self.location = location self.tags = tags + self.identity = identity diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_service.py b/azure-mgmt-search/azure/mgmt/search/models/search_service.py index 077847e78c05..6bd3de6791de 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_service.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_service.py @@ -32,6 +32,8 @@ class SearchService(Resource): :type location: str :param tags: Tags to help categorize the resource in the Azure portal. :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity :param replica_count: The number of replicas in the Search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. Default value: 1 . @@ -101,6 +103,7 @@ class SearchService(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py b/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py index a0e3dd69d375..823afff5b9a5 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py @@ -32,6 +32,8 @@ class SearchService(Resource): :type location: str :param tags: Tags to help categorize the resource in the Azure portal. :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity :param replica_count: The number of replicas in the Search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. Default value: 1 . @@ -101,6 +103,7 @@ class SearchService(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, @@ -110,8 +113,8 @@ class SearchService(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, *, location: str=None, tags=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", sku=None, **kwargs) -> None: - super(SearchService, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, location: str=None, tags=None, identity=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", sku=None, **kwargs) -> None: + super(SearchService, self).__init__(location=location, tags=tags, identity=identity, **kwargs) self.replica_count = replica_count self.partition_count = partition_count self.hosting_mode = hosting_mode diff --git a/azure-mgmt-search/azure/mgmt/search/version.py b/azure-mgmt-search/azure/mgmt/search/version.py index 53c4c7ea05e8..373526c862b8 100644 --- a/azure-mgmt-search/azure/mgmt/search/version.py +++ b/azure-mgmt-search/azure/mgmt/search/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "2015-08-19"