diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py index 941635d07c58..57f099b7317f 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py @@ -9,16 +9,28 @@ # regenerated. # -------------------------------------------------------------------------- -from .error_details import ErrorDetails -from .error_response import ErrorResponse, ErrorResponseException -from .operation_display import OperationDisplay -from .operation import Operation -from .management_group_info import ManagementGroupInfo -from .parent_group_info import ParentGroupInfo -from .management_group_details import ManagementGroupDetails -from .management_group_child_info import ManagementGroupChildInfo -from .management_group import ManagementGroup -from .create_management_group_request import CreateManagementGroupRequest +try: + from .error_details_py3 import ErrorDetails + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .management_group_info_py3 import ManagementGroupInfo + from .parent_group_info_py3 import ParentGroupInfo + from .management_group_details_py3 import ManagementGroupDetails + from .management_group_child_info_py3 import ManagementGroupChildInfo + from .management_group_py3 import ManagementGroup + from .create_management_group_request_py3 import CreateManagementGroupRequest +except (SyntaxError, ImportError): + from .error_details import ErrorDetails + from .error_response import ErrorResponse, ErrorResponseException + from .operation_display import OperationDisplay + from .operation import Operation + from .management_group_info import ManagementGroupInfo + from .parent_group_info import ParentGroupInfo + from .management_group_details import ManagementGroupDetails + from .management_group_child_info import ManagementGroupChildInfo + from .management_group import ManagementGroup + from .create_management_group_request import CreateManagementGroupRequest from .management_group_info_paged import ManagementGroupInfoPaged from .operation_paged import OperationPaged diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py index 78ec7516aede..d9d2c18d4a5d 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py @@ -28,7 +28,7 @@ class CreateManagementGroupRequest(Model): 'parent_id': {'key': 'parentId', 'type': 'str'}, } - def __init__(self, display_name=None, parent_id=None): - super(CreateManagementGroupRequest, self).__init__() - self.display_name = display_name - self.parent_id = parent_id + def __init__(self, **kwargs): + super(CreateManagementGroupRequest, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.parent_id = kwargs.get('parent_id', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request_py3.py new file mode 100644 index 000000000000..a0de7384fccd --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request_py3.py @@ -0,0 +1,34 @@ +# 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 CreateManagementGroupRequest(Model): + """Management group creation parameters. + + :param display_name: The friendly name of the management group. + :type display_name: str + :param parent_id: (Optional) The fully qualified ID for the parent + management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type parent_id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'parent_id': {'key': 'parentId', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, parent_id: str=None, **kwargs) -> None: + super(CreateManagementGroupRequest, self).__init__(**kwargs) + self.display_name = display_name + self.parent_id = parent_id diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py index 97dff2a08156..88463f8a4268 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py @@ -26,7 +26,7 @@ class ErrorDetails(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - super(ErrorDetails, self).__init__() - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details_py3.py new file mode 100644 index 000000000000..c25b45d414b8 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details_py3.py @@ -0,0 +1,32 @@ +# 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 ErrorDetails(Model): + """The details of the error. + + :param code: One of a server-defined set of error codes. + :type code: str + :param message: A human-readable representation of the error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py index a0367d3aaa7c..206717b3e423 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py @@ -24,9 +24,9 @@ class ErrorResponse(Model): 'error': {'key': 'error', 'type': 'ErrorDetails'}, } - def __init__(self, error=None): - super(ErrorResponse, self).__init__() - self.error = error + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorResponseException(HttpOperationError): diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response_py3.py new file mode 100644 index 000000000000..f371695bb4c6 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response_py3.py @@ -0,0 +1,41 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """The error object. + + :param error: Error. + :type error: ~azure.mgmt.managementgroups.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py index 29cfa5bb6b1a..fae76ddf9bae 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py @@ -55,12 +55,12 @@ class ManagementGroup(Model): 'children': {'key': 'properties.children', 'type': '[ManagementGroupChildInfo]'}, } - def __init__(self, tenant_id=None, display_name=None, details=None, children=None): - super(ManagementGroup, self).__init__() + def __init__(self, **kwargs): + super(ManagementGroup, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.tenant_id = tenant_id - self.display_name = display_name - self.details = details - self.children = children + self.tenant_id = kwargs.get('tenant_id', None) + self.display_name = kwargs.get('display_name', None) + self.details = kwargs.get('details', None) + self.children = kwargs.get('children', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py index 209af58e80ff..1cd9094887ca 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py @@ -36,9 +36,9 @@ class ManagementGroupChildInfo(Model): 'children': {'key': 'children', 'type': '[ManagementGroupChildInfo]'}, } - def __init__(self, child_type=None, child_id=None, display_name=None, children=None): - super(ManagementGroupChildInfo, self).__init__() - self.child_type = child_type - self.child_id = child_id - self.display_name = display_name - self.children = children + def __init__(self, **kwargs): + super(ManagementGroupChildInfo, self).__init__(**kwargs) + self.child_type = kwargs.get('child_type', None) + self.child_id = kwargs.get('child_id', None) + self.display_name = kwargs.get('display_name', None) + self.children = kwargs.get('children', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info_py3.py new file mode 100644 index 000000000000..04c5646b06ce --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info_py3.py @@ -0,0 +1,44 @@ +# 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 ManagementGroupChildInfo(Model): + """The child information of a management group. + + :param child_type: The type of child resource. Possible values include: + 'ManagementGroup', 'Subscription' + :type child_type: str or ~azure.mgmt.managementgroups.models.enum + :param child_id: The fully qualified ID for the child resource (management + group or subscription). For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type child_id: str + :param display_name: The friendly name of the child resource. + :type display_name: str + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.ManagementGroupChildInfo] + """ + + _attribute_map = { + 'child_type': {'key': 'childType', 'type': 'str'}, + 'child_id': {'key': 'childId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[ManagementGroupChildInfo]'}, + } + + def __init__(self, *, child_type=None, child_id: str=None, display_name: str=None, children=None, **kwargs) -> None: + super(ManagementGroupChildInfo, self).__init__(**kwargs) + self.child_type = child_type + self.child_id = child_id + self.display_name = display_name + self.children = children diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py index 7618834b6a08..499faa92f9c7 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py @@ -33,9 +33,9 @@ class ManagementGroupDetails(Model): 'parent': {'key': 'parent', 'type': 'ParentGroupInfo'}, } - def __init__(self, version=None, updated_time=None, updated_by=None, parent=None): - super(ManagementGroupDetails, self).__init__() - self.version = version - self.updated_time = updated_time - self.updated_by = updated_by - self.parent = parent + def __init__(self, **kwargs): + super(ManagementGroupDetails, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.updated_time = kwargs.get('updated_time', None) + self.updated_by = kwargs.get('updated_by', None) + self.parent = kwargs.get('parent', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details_py3.py new file mode 100644 index 000000000000..1d47be815022 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details_py3.py @@ -0,0 +1,41 @@ +# 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 ManagementGroupDetails(Model): + """The details of a management group. + + :param version: The version number of the object. + :type version: float + :param updated_time: The date and time when this object was last updated. + :type updated_time: datetime + :param updated_by: The identity of the principal or process that updated + the object. + :type updated_by: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.ParentGroupInfo + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'float'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'}, + 'updated_by': {'key': 'updatedBy', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'ParentGroupInfo'}, + } + + def __init__(self, *, version: float=None, updated_time=None, updated_by: str=None, parent=None, **kwargs) -> None: + super(ManagementGroupDetails, self).__init__(**kwargs) + self.version = version + self.updated_time = updated_time + self.updated_by = updated_by + self.parent = parent diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py index 27f1b74f2293..7e016651bf34 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py @@ -48,10 +48,10 @@ class ManagementGroupInfo(Model): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, } - def __init__(self, tenant_id=None, display_name=None): - super(ManagementGroupInfo, self).__init__() + def __init__(self, **kwargs): + super(ManagementGroupInfo, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.tenant_id = tenant_id - self.display_name = display_name + self.tenant_id = kwargs.get('tenant_id', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info_py3.py new file mode 100644 index 000000000000..b9d250177747 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info_py3.py @@ -0,0 +1,57 @@ +# 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 ManagementGroupInfo(Model): + """The management group resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, display_name: str=None, **kwargs) -> None: + super(ManagementGroupInfo, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = tenant_id + self.display_name = display_name diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_py3.py new file mode 100644 index 000000000000..f1b0418aa68b --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_py3.py @@ -0,0 +1,66 @@ +# 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 ManagementGroup(Model): + """The management group details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param details: Details. + :type details: ~azure.mgmt.managementgroups.models.ManagementGroupDetails + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.ManagementGroupChildInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'details': {'key': 'properties.details', 'type': 'ManagementGroupDetails'}, + 'children': {'key': 'properties.children', 'type': '[ManagementGroupChildInfo]'}, + } + + def __init__(self, *, tenant_id: str=None, display_name: str=None, details=None, children=None, **kwargs) -> None: + super(ManagementGroup, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = tenant_id + self.display_name = display_name + self.details = details + self.children = children diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py index 832260c9ce06..434dabd3ef7a 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py @@ -33,7 +33,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, display=None): - super(Operation, self).__init__() + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) self.name = None - self.display = display + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py index 1c60d0d60eb9..f1b32554c7a0 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py @@ -42,8 +42,8 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self): - super(OperationDisplay, self).__init__() + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_py3.py new file mode 100644 index 000000000000..a8333ae1d534 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_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 OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The name of the provider. + :vartype provider: str + :ivar resource: The resource on which the operation is performed. + :vartype resource: str + :ivar operation: The operation that can be performed. + :vartype operation: str + :ivar description: Operation description. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_py3.py new file mode 100644 index 000000000000..b8eecedd7409 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_py3.py @@ -0,0 +1,39 @@ +# 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 Operation(Model): + """Operation supported by the Microsoft.Management resource provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.managementgroups.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py index fb4b8942975b..c78784724450 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py @@ -28,7 +28,7 @@ class ParentGroupInfo(Model): 'display_name': {'key': 'displayName', 'type': 'str'}, } - def __init__(self, parent_id=None, display_name=None): - super(ParentGroupInfo, self).__init__() - self.parent_id = parent_id - self.display_name = display_name + def __init__(self, **kwargs): + super(ParentGroupInfo, self).__init__(**kwargs) + self.parent_id = kwargs.get('parent_id', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info_py3.py new file mode 100644 index 000000000000..7920fc6b21e1 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info_py3.py @@ -0,0 +1,34 @@ +# 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 ParentGroupInfo(Model): + """(Optional) The ID of the parent management group. + + :param parent_id: The fully qualified ID for the parent management group. + For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type parent_id: str + :param display_name: The friendly name of the parent management group. + :type display_name: str + """ + + _attribute_map = { + 'parent_id': {'key': 'parentId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, parent_id: str=None, display_name: str=None, **kwargs) -> None: + super(ParentGroupInfo, self).__init__(**kwargs) + self.parent_id = parent_id + self.display_name = display_name diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py index 0f196aefeb6d..84e6bcd65c68 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py @@ -21,7 +21,7 @@ class ManagementGroupSubscriptionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of the API to be used with the client request. The current version is 2017-11-01-preview. Constant value: "2017-11-01-preview". """ @@ -59,7 +59,7 @@ def create( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}' + url = self.create.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str'), 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') @@ -92,6 +92,7 @@ def create( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + create.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}'} def delete( self, group_id, subscription_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): @@ -116,7 +117,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}' + url = self.delete.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str'), 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') @@ -149,3 +150,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py index 85636fbb5010..54d84f695947 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py @@ -21,7 +21,7 @@ class ManagementGroupsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of the API to be used with the client request. The current version is 2017-11-01-preview. Constant value: "2017-11-01-preview". """ @@ -65,7 +65,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Management/managementGroups' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -108,6 +108,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/managementGroups'} def get( self, group_id, expand=None, recurse=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): @@ -139,7 +140,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.get.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -182,6 +183,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} def create_or_update( self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): @@ -212,7 +214,7 @@ def create_or_update( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -255,6 +257,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} def update( self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): @@ -282,7 +285,7 @@ def update( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.update.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -325,6 +328,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} def delete( self, group_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): @@ -348,7 +352,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.delete.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -380,3 +384,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py index 184c6c83b1b1..c91a8f64525b 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py @@ -21,7 +21,7 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of the API to be used with the client request. The current version is 2017-11-01-preview. Constant value: "2017-11-01-preview". """ @@ -55,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Management/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -94,3 +94,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/operations'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py index e0ec669828cb..2e47e927c208 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "2017-11-01-preview"