From 32516c30045c9d592e5b53813b34e24e78e6f01d Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 9 Nov 2018 22:45:23 +0000 Subject: [PATCH 1/4] Generated from 73c3ebb5e203fc53ce5cdb52d31170729775848f Added missing PATCH operation to Api Issue resource --- .../operations/api_issue_operations.py | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py index b3e3633b07d4..079726db68ac 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py @@ -350,6 +350,89 @@ def create_or_update( return deserialized create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} + def update( + self, resource_group_name, service_name, api_id, issue_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param parameters: Update parameters. + :type parameters: ~azure.mgmt.apimanagement.models.IssueContract + :param if_match: ETag of the Issue Entity. ETag should match the + current entity state from the header response of the GET request or it + should be * for unconditional update. + :type if_match: 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: IssueContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'(^[\w]+$)|(^[\w][\w\-]+[\w]$)'), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_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') + + # 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 if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + 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, 'IssueContract') + + # 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, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IssueContract', response) + if response.status_code == 201: + deserialized = self._deserialize('IssueContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} + def delete( self, resource_group_name, service_name, api_id, issue_id, if_match, custom_headers=None, raw=False, **operation_config): """Deletes the specified Issue from an API. From 04eece8875f8ce0802e76f84a9bc8fc8143a4a16 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Fri, 9 Nov 2018 22:50:40 +0000 Subject: [PATCH 2/4] Packaging update of azure-mgmt-apimanagement --- azure-mgmt-apimanagement/MANIFEST.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-mgmt-apimanagement/MANIFEST.in b/azure-mgmt-apimanagement/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-apimanagement/MANIFEST.in +++ b/azure-mgmt-apimanagement/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + From 4044466fa641b591e39cc23f0f783ba61319fd4a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 9 Nov 2018 23:27:16 +0000 Subject: [PATCH 3/4] Generated from dcb5eb7ef83a50275a7d92747baaad3a850286a4 Added missing PATCH operation to Api Issue resource --- .../mgmt/apimanagement/models/__init__.py | 6 +++ .../apimanagement/models/issue_contract.py | 26 +++++----- .../models/issue_contract_base_properties.py | 38 ++++++++++++++ .../issue_contract_base_properties_py3.py | 38 ++++++++++++++ .../models/issue_contract_py3.py | 26 +++++----- .../models/issue_update_contract.py | 50 +++++++++++++++++++ .../models/issue_update_contract_py3.py | 50 +++++++++++++++++++ .../operations/api_issue_operations.py | 23 +++------ 8 files changed, 214 insertions(+), 43 deletions(-) create mode 100644 azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties.py create mode 100644 azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties_py3.py create mode 100644 azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract.py create mode 100644 azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract_py3.py diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index d35d341ff41c..8d8c3271fcd0 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -43,6 +43,8 @@ from .operation_update_contract_py3 import OperationUpdateContract from .schema_contract_py3 import SchemaContract from .issue_contract_py3 import IssueContract + from .issue_update_contract_py3 import IssueUpdateContract + from .issue_contract_base_properties_py3 import IssueContractBaseProperties from .issue_comment_contract_py3 import IssueCommentContract from .issue_attachment_contract_py3 import IssueAttachmentContract from .logger_contract_py3 import LoggerContract @@ -189,6 +191,8 @@ from .operation_update_contract import OperationUpdateContract from .schema_contract import SchemaContract from .issue_contract import IssueContract + from .issue_update_contract import IssueUpdateContract + from .issue_contract_base_properties import IssueContractBaseProperties from .issue_comment_contract import IssueCommentContract from .issue_attachment_contract import IssueAttachmentContract from .logger_contract import LoggerContract @@ -401,6 +405,8 @@ 'OperationUpdateContract', 'SchemaContract', 'IssueContract', + 'IssueUpdateContract', + 'IssueContractBaseProperties', 'IssueCommentContract', 'IssueAttachmentContract', 'LoggerContract', diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract.py index 2a2c6ac6a303..7e9a0bb26e16 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract.py @@ -26,21 +26,21 @@ class IssueContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :param title: Required. The issue title. - :type title: str - :param description: Required. Text describing the issue. - :type description: str :param created_date: Date and time when the issue was created. :type created_date: datetime :param state: Status of the issue. Possible values include: 'proposed', 'open', 'removed', 'resolved', 'closed' :type state: str or ~azure.mgmt.apimanagement.models.State - :param user_id: Required. A resource identifier for the user created the - issue. - :type user_id: str :param api_id: A resource identifier for the API the issue was created for. :type api_id: str + :param title: Required. The issue title. + :type title: str + :param description: Required. Text describing the issue. + :type description: str + :param user_id: Required. A resource identifier for the user created the + issue. + :type user_id: str """ _validation = { @@ -56,19 +56,19 @@ class IssueContract(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, 'state': {'key': 'properties.state', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, } def __init__(self, **kwargs): super(IssueContract, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) self.created_date = kwargs.get('created_date', None) self.state = kwargs.get('state', None) - self.user_id = kwargs.get('user_id', None) self.api_id = kwargs.get('api_id', None) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.user_id = kwargs.get('user_id', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties.py new file mode 100644 index 000000000000..8bf825f0f0de --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties.py @@ -0,0 +1,38 @@ +# 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 IssueContractBaseProperties(Model): + """Issue contract Base Properties. + + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'api_id': {'key': 'apiId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IssueContractBaseProperties, self).__init__(**kwargs) + self.created_date = kwargs.get('created_date', None) + self.state = kwargs.get('state', None) + self.api_id = kwargs.get('api_id', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties_py3.py new file mode 100644 index 000000000000..30126d7f0845 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties_py3.py @@ -0,0 +1,38 @@ +# 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 IssueContractBaseProperties(Model): + """Issue contract Base Properties. + + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'api_id': {'key': 'apiId', 'type': 'str'}, + } + + def __init__(self, *, created_date=None, state=None, api_id: str=None, **kwargs) -> None: + super(IssueContractBaseProperties, self).__init__(**kwargs) + self.created_date = created_date + self.state = state + self.api_id = api_id diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_py3.py index fb9605cf3507..f635214f5b15 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_py3.py @@ -26,21 +26,21 @@ class IssueContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :param title: Required. The issue title. - :type title: str - :param description: Required. Text describing the issue. - :type description: str :param created_date: Date and time when the issue was created. :type created_date: datetime :param state: Status of the issue. Possible values include: 'proposed', 'open', 'removed', 'resolved', 'closed' :type state: str or ~azure.mgmt.apimanagement.models.State - :param user_id: Required. A resource identifier for the user created the - issue. - :type user_id: str :param api_id: A resource identifier for the API the issue was created for. :type api_id: str + :param title: Required. The issue title. + :type title: str + :param description: Required. Text describing the issue. + :type description: str + :param user_id: Required. A resource identifier for the user created the + issue. + :type user_id: str """ _validation = { @@ -56,19 +56,19 @@ class IssueContract(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, 'state': {'key': 'properties.state', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, } def __init__(self, *, title: str, description: str, user_id: str, created_date=None, state=None, api_id: str=None, **kwargs) -> None: super(IssueContract, self).__init__(**kwargs) - self.title = title - self.description = description self.created_date = created_date self.state = state - self.user_id = user_id self.api_id = api_id + self.title = title + self.description = description + self.user_id = user_id diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract.py new file mode 100644 index 000000000000..cd0c09f71fe8 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract.py @@ -0,0 +1,50 @@ +# 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 IssueUpdateContract(Model): + """Issue update Parameters. + + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + :param title: The issue title. + :type title: str + :param description: Text describing the issue. + :type description: str + :param user_id: A resource identifier for the user created the issue. + :type user_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IssueUpdateContract, self).__init__(**kwargs) + self.created_date = kwargs.get('created_date', None) + self.state = kwargs.get('state', None) + self.api_id = kwargs.get('api_id', None) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.user_id = kwargs.get('user_id', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract_py3.py new file mode 100644 index 000000000000..adaf82829d94 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract_py3.py @@ -0,0 +1,50 @@ +# 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 IssueUpdateContract(Model): + """Issue update Parameters. + + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + :param title: The issue title. + :type title: str + :param description: Text describing the issue. + :type description: str + :param user_id: A resource identifier for the user created the issue. + :type user_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, *, created_date=None, state=None, api_id: str=None, title: str=None, description: str=None, user_id: str=None, **kwargs) -> None: + super(IssueUpdateContract, self).__init__(**kwargs) + self.created_date = created_date + self.state = state + self.api_id = api_id + self.title = title + self.description = description + self.user_id = user_id diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py index 079726db68ac..c89df36dc15d 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py @@ -365,7 +365,7 @@ def update( Management service instance. :type issue_id: str :param parameters: Update parameters. - :type parameters: ~azure.mgmt.apimanagement.models.IssueContract + :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract :param if_match: ETag of the Issue Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -375,9 +375,8 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: IssueContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IssueContract or - ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ @@ -398,7 +397,6 @@ def update( # 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()) @@ -410,27 +408,18 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'IssueContract') + body_content = self._serialize.body(parameters, 'IssueUpdateContract') # 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, 201]: + if response.status_code not in [204]: raise models.ErrorResponseException(self._deserialize, response) - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IssueContract', response) - if response.status_code == 201: - deserialized = self._deserialize('IssueContract', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - - return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} def delete( From 872459122b9b5a609ee2601ccaabc95eaf651e7e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 14 Nov 2018 15:47:54 +0000 Subject: [PATCH 4/4] Generated from ccc27d4c2f7026867aa2bcf3e67b6359c3ec0f11 Added missing PATCH operation to Api Issue resource --- .../mgmt/apimanagement/models/user_contract.py | 7 +++---- .../apimanagement/models/user_contract_py3.py | 9 ++++----- .../models/user_create_parameters.py | 10 +++------- .../models/user_create_parameters_py3.py | 12 ++++-------- .../models/user_entity_base_parameters.py | 13 +++---------- .../models/user_entity_base_parameters_py3.py | 15 ++++----------- .../models/user_update_parameters.py | 10 +++------- .../models/user_update_parameters_py3.py | 12 ++++-------- 8 files changed, 28 insertions(+), 60 deletions(-) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract.py index e231f588b45d..b36d4717e4d4 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract.py @@ -32,8 +32,8 @@ class UserContract(Resource): :type state: str or ~azure.mgmt.apimanagement.models.UserState :param note: Optional note about a user set by the administrator. :type note: str - :ivar identities: Collection of user identities. - :vartype identities: + :param identities: Collection of user identities. + :type identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] :param first_name: First name. :type first_name: str @@ -54,7 +54,6 @@ class UserContract(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'identities': {'readonly': True}, 'groups': {'readonly': True}, } @@ -76,7 +75,7 @@ def __init__(self, **kwargs): super(UserContract, self).__init__(**kwargs) self.state = kwargs.get('state', "active") self.note = kwargs.get('note', None) - self.identities = None + self.identities = kwargs.get('identities', None) self.first_name = kwargs.get('first_name', None) self.last_name = kwargs.get('last_name', None) self.email = kwargs.get('email', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_py3.py index b1069e94e4c7..3c2d23be38af 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_py3.py @@ -32,8 +32,8 @@ class UserContract(Resource): :type state: str or ~azure.mgmt.apimanagement.models.UserState :param note: Optional note about a user set by the administrator. :type note: str - :ivar identities: Collection of user identities. - :vartype identities: + :param identities: Collection of user identities. + :type identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] :param first_name: First name. :type first_name: str @@ -54,7 +54,6 @@ class UserContract(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'identities': {'readonly': True}, 'groups': {'readonly': True}, } @@ -72,11 +71,11 @@ class UserContract(Resource): 'groups': {'key': 'properties.groups', 'type': '[GroupContractProperties]'}, } - def __init__(self, *, state="active", note: str=None, first_name: str=None, last_name: str=None, email: str=None, registration_date=None, **kwargs) -> None: + def __init__(self, *, state="active", note: str=None, identities=None, first_name: str=None, last_name: str=None, email: str=None, registration_date=None, **kwargs) -> None: super(UserContract, self).__init__(**kwargs) self.state = state self.note = note - self.identities = None + self.identities = identities self.first_name = first_name self.last_name = last_name self.email = email diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters.py index abcd03a8f7cc..c2a08c3fd236 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters.py @@ -15,9 +15,6 @@ class UserCreateParameters(Model): """User create details. - 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 state: Account state. Specifies whether the user is active or not. @@ -28,8 +25,8 @@ class UserCreateParameters(Model): :type state: str or ~azure.mgmt.apimanagement.models.UserState :param note: Optional note about a user set by the administrator. :type note: str - :ivar identities: Collection of user identities. - :vartype identities: + :param identities: Collection of user identities. + :type identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] :param email: Required. Email address. Must not be empty and must be unique within the service instance. @@ -48,7 +45,6 @@ class UserCreateParameters(Model): """ _validation = { - 'identities': {'readonly': True}, 'email': {'required': True, 'max_length': 254, 'min_length': 1}, 'first_name': {'required': True, 'max_length': 100, 'min_length': 1}, 'last_name': {'required': True, 'max_length': 100, 'min_length': 1}, @@ -69,7 +65,7 @@ def __init__(self, **kwargs): super(UserCreateParameters, self).__init__(**kwargs) self.state = kwargs.get('state', "active") self.note = kwargs.get('note', None) - self.identities = None + self.identities = kwargs.get('identities', None) self.email = kwargs.get('email', None) self.first_name = kwargs.get('first_name', None) self.last_name = kwargs.get('last_name', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters_py3.py index 86aa48cc8924..240440728fdb 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters_py3.py @@ -15,9 +15,6 @@ class UserCreateParameters(Model): """User create details. - 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 state: Account state. Specifies whether the user is active or not. @@ -28,8 +25,8 @@ class UserCreateParameters(Model): :type state: str or ~azure.mgmt.apimanagement.models.UserState :param note: Optional note about a user set by the administrator. :type note: str - :ivar identities: Collection of user identities. - :vartype identities: + :param identities: Collection of user identities. + :type identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] :param email: Required. Email address. Must not be empty and must be unique within the service instance. @@ -48,7 +45,6 @@ class UserCreateParameters(Model): """ _validation = { - 'identities': {'readonly': True}, 'email': {'required': True, 'max_length': 254, 'min_length': 1}, 'first_name': {'required': True, 'max_length': 100, 'min_length': 1}, 'last_name': {'required': True, 'max_length': 100, 'min_length': 1}, @@ -65,11 +61,11 @@ class UserCreateParameters(Model): 'confirmation': {'key': 'properties.confirmation', 'type': 'str'}, } - def __init__(self, *, email: str, first_name: str, last_name: str, state="active", note: str=None, password: str=None, confirmation=None, **kwargs) -> None: + def __init__(self, *, email: str, first_name: str, last_name: str, state="active", note: str=None, identities=None, password: str=None, confirmation=None, **kwargs) -> None: super(UserCreateParameters, self).__init__(**kwargs) self.state = state self.note = note - self.identities = None + self.identities = identities self.email = email self.first_name = first_name self.last_name = last_name diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters.py index 4f5724636981..f190379aa298 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters.py @@ -15,9 +15,6 @@ class UserEntityBaseParameters(Model): """User Entity Base Parameters set. - Variables are only populated by the server, and will be ignored when - sending a request. - :param state: Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values @@ -26,15 +23,11 @@ class UserEntityBaseParameters(Model): :type state: str or ~azure.mgmt.apimanagement.models.UserState :param note: Optional note about a user set by the administrator. :type note: str - :ivar identities: Collection of user identities. - :vartype identities: + :param identities: Collection of user identities. + :type identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] """ - _validation = { - 'identities': {'readonly': True}, - } - _attribute_map = { 'state': {'key': 'state', 'type': 'str'}, 'note': {'key': 'note', 'type': 'str'}, @@ -45,4 +38,4 @@ def __init__(self, **kwargs): super(UserEntityBaseParameters, self).__init__(**kwargs) self.state = kwargs.get('state', "active") self.note = kwargs.get('note', None) - self.identities = None + self.identities = kwargs.get('identities', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters_py3.py index 1e3fe35a8fcb..cd8a291e9a3a 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters_py3.py @@ -15,9 +15,6 @@ class UserEntityBaseParameters(Model): """User Entity Base Parameters set. - Variables are only populated by the server, and will be ignored when - sending a request. - :param state: Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values @@ -26,23 +23,19 @@ class UserEntityBaseParameters(Model): :type state: str or ~azure.mgmt.apimanagement.models.UserState :param note: Optional note about a user set by the administrator. :type note: str - :ivar identities: Collection of user identities. - :vartype identities: + :param identities: Collection of user identities. + :type identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] """ - _validation = { - 'identities': {'readonly': True}, - } - _attribute_map = { 'state': {'key': 'state', 'type': 'str'}, 'note': {'key': 'note', 'type': 'str'}, 'identities': {'key': 'identities', 'type': '[UserIdentityContract]'}, } - def __init__(self, *, state="active", note: str=None, **kwargs) -> None: + def __init__(self, *, state="active", note: str=None, identities=None, **kwargs) -> None: super(UserEntityBaseParameters, self).__init__(**kwargs) self.state = state self.note = note - self.identities = None + self.identities = identities diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters.py index 004573972d31..2adc28870a0f 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters.py @@ -15,9 +15,6 @@ class UserUpdateParameters(Model): """User update parameters. - Variables are only populated by the server, and will be ignored when - sending a request. - :param state: Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values @@ -26,8 +23,8 @@ class UserUpdateParameters(Model): :type state: str or ~azure.mgmt.apimanagement.models.UserState :param note: Optional note about a user set by the administrator. :type note: str - :ivar identities: Collection of user identities. - :vartype identities: + :param identities: Collection of user identities. + :type identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] :param email: Email address. Must not be empty and must be unique within the service instance. @@ -41,7 +38,6 @@ class UserUpdateParameters(Model): """ _validation = { - 'identities': {'readonly': True}, 'email': {'max_length': 254, 'min_length': 1}, 'first_name': {'max_length': 100, 'min_length': 1}, 'last_name': {'max_length': 100, 'min_length': 1}, @@ -61,7 +57,7 @@ def __init__(self, **kwargs): super(UserUpdateParameters, self).__init__(**kwargs) self.state = kwargs.get('state', "active") self.note = kwargs.get('note', None) - self.identities = None + self.identities = kwargs.get('identities', None) self.email = kwargs.get('email', None) self.password = kwargs.get('password', None) self.first_name = kwargs.get('first_name', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters_py3.py index 1d70413aff74..8208852bdcb2 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters_py3.py @@ -15,9 +15,6 @@ class UserUpdateParameters(Model): """User update parameters. - Variables are only populated by the server, and will be ignored when - sending a request. - :param state: Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. Possible values @@ -26,8 +23,8 @@ class UserUpdateParameters(Model): :type state: str or ~azure.mgmt.apimanagement.models.UserState :param note: Optional note about a user set by the administrator. :type note: str - :ivar identities: Collection of user identities. - :vartype identities: + :param identities: Collection of user identities. + :type identities: list[~azure.mgmt.apimanagement.models.UserIdentityContract] :param email: Email address. Must not be empty and must be unique within the service instance. @@ -41,7 +38,6 @@ class UserUpdateParameters(Model): """ _validation = { - 'identities': {'readonly': True}, 'email': {'max_length': 254, 'min_length': 1}, 'first_name': {'max_length': 100, 'min_length': 1}, 'last_name': {'max_length': 100, 'min_length': 1}, @@ -57,11 +53,11 @@ class UserUpdateParameters(Model): 'last_name': {'key': 'properties.lastName', 'type': 'str'}, } - def __init__(self, *, state="active", note: str=None, email: str=None, password: str=None, first_name: str=None, last_name: str=None, **kwargs) -> None: + def __init__(self, *, state="active", note: str=None, identities=None, email: str=None, password: str=None, first_name: str=None, last_name: str=None, **kwargs) -> None: super(UserUpdateParameters, self).__init__(**kwargs) self.state = state self.note = note - self.identities = None + self.identities = identities self.email = email self.password = password self.first_name = first_name