From 873c8bbcc9f1cac355b4463071ae6149b3255b68 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 21 Mar 2019 16:39:29 +0000 Subject: [PATCH 1/3] Generated from 0d1aa530d9811e1e0cd7a6926699ce6c78b6e1bd add python readme --- .../azure/mgmt/managedservices/__init__.py | 18 + .../managed_services_client.py | 84 +++++ .../mgmt/managedservices/models/__init__.py | 63 ++++ .../managedservices/models/authorization.py | 45 +++ .../models/authorization_py3.py | 45 +++ .../managedservices/models/error_response.py | 50 +++ .../models/error_response_error.py | 41 +++ .../models/error_response_error_py3.py | 41 +++ .../models/error_response_py3.py | 50 +++ .../models/managed_services_client_enums.py | 28 ++ .../mgmt/managedservices/models/operation.py | 40 +++ .../models/operation_display.py | 41 +++ .../models/operation_display_py3.py | 41 +++ .../managedservices/models/operation_list.py | 35 ++ .../models/operation_list_py3.py | 35 ++ .../managedservices/models/operation_py3.py | 40 +++ .../azure/mgmt/managedservices/models/plan.py | 49 +++ .../mgmt/managedservices/models/plan_py3.py | 49 +++ .../models/registration_assignment.py | 50 +++ .../models/registration_assignment_paged.py | 27 ++ .../registration_assignment_properties.py | 54 +++ .../registration_assignment_properties_py3.py | 54 +++ ...ment_properties_registration_definition.py | 56 ++++ ...ties_registration_definition_properties.py | 62 ++++ ..._registration_definition_properties_py3.py | 62 ++++ ..._properties_registration_definition_py3.py | 56 ++++ .../models/registration_assignment_py3.py | 50 +++ .../models/registration_definition.py | 54 +++ .../models/registration_definition_paged.py | 27 ++ .../registration_definition_properties.py | 67 ++++ .../registration_definition_properties_py3.py | 67 ++++ .../models/registration_definition_py3.py | 54 +++ .../managedservices/operations/__init__.py | 20 ++ .../managedservices/operations/operations.py | 88 +++++ .../registration_assignments_operations.py | 311 ++++++++++++++++++ .../registration_definitions_operations.py | 301 +++++++++++++++++ .../azure/mgmt/managedservices/version.py | 13 + 37 files changed, 2268 insertions(+) create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/managed_services_client_enums.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/managedservices/version.py diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py new file mode 100644 index 000000000000..395333b4333e --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py @@ -0,0 +1,18 @@ +# 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 .managed_services_client import ManagedServicesClient +from .version import VERSION + +__all__ = ['ManagedServicesClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py new file mode 100644 index 000000000000..f203c43a60f9 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py @@ -0,0 +1,84 @@ +# 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.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.registration_definitions_operations import RegistrationDefinitionsOperations +from .operations.registration_assignments_operations import RegistrationAssignmentsOperations +from .operations.operations import Operations +from . import models + + +class ManagedServicesClientConfiguration(AzureConfiguration): + """Configuration for ManagedServicesClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ManagedServicesClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-managedservices/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + + +class ManagedServicesClient(SDKClient): + """Specification for ManagedServices. + + :ivar config: Configuration for client. + :vartype config: ManagedServicesClientConfiguration + + :ivar registration_definitions: RegistrationDefinitions operations + :vartype registration_definitions: azure.mgmt.managedservices.operations.RegistrationDefinitionsOperations + :ivar registration_assignments: RegistrationAssignments operations + :vartype registration_assignments: azure.mgmt.managedservices.operations.RegistrationAssignmentsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.managedservices.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = ManagedServicesClientConfiguration(credentials, base_url) + super(ManagedServicesClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-06-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.registration_definitions = RegistrationDefinitionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.registration_assignments = RegistrationAssignmentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py new file mode 100644 index 000000000000..e5f57b0313ff --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py @@ -0,0 +1,63 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from .authorization_py3 import Authorization + from .registration_definition_properties_py3 import RegistrationDefinitionProperties + from .plan_py3 import Plan + from .registration_definition_py3 import RegistrationDefinition + from .registration_assignment_properties_registration_definition_properties_py3 import RegistrationAssignmentPropertiesRegistrationDefinitionProperties + from .registration_assignment_properties_registration_definition_py3 import RegistrationAssignmentPropertiesRegistrationDefinition + from .registration_assignment_properties_py3 import RegistrationAssignmentProperties + from .registration_assignment_py3 import RegistrationAssignment + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .operation_list_py3 import OperationList + from .error_response_error_py3 import ErrorResponseError + from .error_response_py3 import ErrorResponse, ErrorResponseException +except (SyntaxError, ImportError): + from .authorization import Authorization + from .registration_definition_properties import RegistrationDefinitionProperties + from .plan import Plan + from .registration_definition import RegistrationDefinition + from .registration_assignment_properties_registration_definition_properties import RegistrationAssignmentPropertiesRegistrationDefinitionProperties + from .registration_assignment_properties_registration_definition import RegistrationAssignmentPropertiesRegistrationDefinition + from .registration_assignment_properties import RegistrationAssignmentProperties + from .registration_assignment import RegistrationAssignment + from .operation_display import OperationDisplay + from .operation import Operation + from .operation_list import OperationList + from .error_response_error import ErrorResponseError + from .error_response import ErrorResponse, ErrorResponseException +from .registration_definition_paged import RegistrationDefinitionPaged +from .registration_assignment_paged import RegistrationAssignmentPaged +from .managed_services_client_enums import ( + ProvisioningState, +) + +__all__ = [ + 'Authorization', + 'RegistrationDefinitionProperties', + 'Plan', + 'RegistrationDefinition', + 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties', + 'RegistrationAssignmentPropertiesRegistrationDefinition', + 'RegistrationAssignmentProperties', + 'RegistrationAssignment', + 'OperationDisplay', + 'Operation', + 'OperationList', + 'ErrorResponseError', + 'ErrorResponse', 'ErrorResponseException', + 'RegistrationDefinitionPaged', + 'RegistrationAssignmentPaged', + 'ProvisioningState', +] diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py new file mode 100644 index 000000000000..d44f2b851134 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py @@ -0,0 +1,45 @@ +# 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 Authorization(Model): + """Authorization tuple containing principal Id (of user/service + principal/security group) and role definition id. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. Principal Id of the security group/service + principal/user that would be assigned permissions to the projected + subscription + :type principal_id: str + :param role_definition_id: Required. The role definition identifier. This + role will define all the permissions that the security group/service + principal/user must have on the projected subscription. This role cannot + be an owner role. + :type role_definition_id: str + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Authorization, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.role_definition_id = kwargs.get('role_definition_id', None) diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py new file mode 100644 index 000000000000..dd5307748705 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py @@ -0,0 +1,45 @@ +# 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 Authorization(Model): + """Authorization tuple containing principal Id (of user/service + principal/security group) and role definition id. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. Principal Id of the security group/service + principal/user that would be assigned permissions to the projected + subscription + :type principal_id: str + :param role_definition_id: Required. The role definition identifier. This + role will define all the permissions that the security group/service + principal/user must have on the projected subscription. This role cannot + be an owner role. + :type role_definition_id: str + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + } + + def __init__(self, *, principal_id: str, role_definition_id: str, **kwargs) -> None: + super(Authorization, self).__init__(**kwargs) + self.principal_id = principal_id + self.role_definition_id = role_definition_id diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py new file mode 100644 index 000000000000..0bb2ae53f561 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.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 +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error response indicates Azure Resource Manager is not able + to process the incoming request. The reason is provided in the error + message. + :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = None + + +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-managedservices/azure/mgmt/managedservices/models/error_response_error.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.py new file mode 100644 index 000000000000..a22a3fe7daf9 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.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 ErrorResponseError(Model): + """Error response indicates Azure Resource Manager is not able to process the + incoming request. The reason is provided in the error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message indicating why the operation + failed. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_py3.py new file mode 100644 index 000000000000..0407b0d4e106 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_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 ErrorResponseError(Model): + """Error response indicates Azure Resource Manager is not able to process the + incoming request. The reason is provided in the error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message indicating why the operation + failed. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, **kwargs) -> None: + super(ErrorResponseError, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py new file mode 100644 index 000000000000..65bd21421859 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_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 +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error response indicates Azure Resource Manager is not able + to process the incoming request. The reason is provided in the error + message. + :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = None + + +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-managedservices/azure/mgmt/managedservices/models/managed_services_client_enums.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/managed_services_client_enums.py new file mode 100644 index 000000000000..7c973162069e --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/managed_services_client_enums.py @@ -0,0 +1,28 @@ +# 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 enum import Enum + + +class ProvisioningState(str, Enum): + + not_specified = "NotSpecified" + accepted = "Accepted" + running = "Running" + ready = "Ready" + creating = "Creating" + created = "Created" + deleting = "Deleting" + deleted = "Deleted" + canceled = "Canceled" + failed = "Failed" + succeeded = "Succeeded" + updating = "Updating" diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py new file mode 100644 index 000000000000..7e49643561f5 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py @@ -0,0 +1,40 @@ +# 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): + """Object that desctibes a single Microsoft.ManagedServices operation. + + 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 + :ivar display: The object that represents the operation. + :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.py new file mode 100644 index 000000000000..ff3c7d57b1bf --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.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 OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ManagedServices + :type provider: str + :param resource: Resource on which the operation is performed: + Registration definition, registration assignment etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _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): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_py3.py new file mode 100644 index 000000000000..f6d0e99a0718 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_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 OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ManagedServices + :type provider: str + :param resource: Resource on which the operation is performed: + Registration definition, registration assignment etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _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, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py new file mode 100644 index 000000000000..b3f2e806af4e --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py @@ -0,0 +1,35 @@ +# 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 OperationList(Model): + """List of the operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Microsoft.ManagedServices operations. + :vartype value: list[~azure.mgmt.managedservices.models.Operation] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, **kwargs): + super(OperationList, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py new file mode 100644 index 000000000000..aed3a8d3ce94 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py @@ -0,0 +1,35 @@ +# 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 OperationList(Model): + """List of the operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Microsoft.ManagedServices operations. + :vartype value: list[~azure.mgmt.managedservices.models.Operation] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationList, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py new file mode 100644 index 000000000000..aa8fa421a794 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py @@ -0,0 +1,40 @@ +# 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): + """Object that desctibes a single Microsoft.ManagedServices operation. + + 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 + :ivar display: The object that represents the operation. + :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py new file mode 100644 index 000000000000..96a1757eeab2 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py @@ -0,0 +1,49 @@ +# 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 Plan(Model): + """Plan details for the managed services. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The plan name. + :type name: str + :param publisher: Required. The publisher ID. + :type publisher: str + :param product: Required. The product code. + :type product: str + :param version: Required. The plan's version. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py new file mode 100644 index 000000000000..0c37b6b98ba7 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py @@ -0,0 +1,49 @@ +# 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 Plan(Model): + """Plan details for the managed services. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The plan name. + :type name: str + :param publisher: Required. The publisher ID. + :type publisher: str + :param product: Required. The product code. + :type product: str + :param version: Required. The plan's version. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, name: str, publisher: str, product: str, version: str, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.version = version diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py new file mode 100644 index 000000000000..d92e0ddf3858 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.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 RegistrationAssignment(Model): + """Registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties + :ivar id: The fully qualified path of the registration assignment. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration assignment. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignment, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.type = None + self.name = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py new file mode 100644 index 000000000000..21a68092ffb5 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class RegistrationAssignmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegistrationAssignment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegistrationAssignment]'} + } + + def __init__(self, *args, **kwargs): + + super(RegistrationAssignmentPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py new file mode 100644 index 000000000000..8e4bab71b31c --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py @@ -0,0 +1,54 @@ +# 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 RegistrationAssignmentProperties(Model): + """Properties of a registration assignment. + + 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 registration_definition_id: Required. Fully qualified path of the + registration definition. + :type registration_definition_id: str + :ivar provisioning_state: Current state of the registration assignment. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar registration_definition: Registration definition inside registration + assignment. + :vartype registration_definition: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition + """ + + _validation = { + 'registration_definition_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'registration_definition': {'readonly': True}, + } + + _attribute_map = { + 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignmentProperties, self).__init__(**kwargs) + self.registration_definition_id = kwargs.get('registration_definition_id', None) + self.provisioning_state = None + self.registration_definition = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py new file mode 100644 index 000000000000..1eb37689784d --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py @@ -0,0 +1,54 @@ +# 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 RegistrationAssignmentProperties(Model): + """Properties of a registration assignment. + + 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 registration_definition_id: Required. Fully qualified path of the + registration definition. + :type registration_definition_id: str + :ivar provisioning_state: Current state of the registration assignment. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar registration_definition: Registration definition inside registration + assignment. + :vartype registration_definition: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition + """ + + _validation = { + 'registration_definition_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'registration_definition': {'readonly': True}, + } + + _attribute_map = { + 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, + } + + def __init__(self, *, registration_definition_id: str, **kwargs) -> None: + super(RegistrationAssignmentProperties, self).__init__(**kwargs) + self.registration_definition_id = registration_definition_id + self.provisioning_state = None + self.registration_definition = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py new file mode 100644 index 000000000000..024c1af8b5b3 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py @@ -0,0 +1,56 @@ +# 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 RegistrationAssignmentPropertiesRegistrationDefinition(Model): + """Registration definition inside registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of registration definition inside + registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.plan = kwargs.get('plan', None) + self.id = None + self.type = None + self.name = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py new file mode 100644 index 000000000000..a138846084d8 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py @@ -0,0 +1,62 @@ +# 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 RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): + """Properties of registration definition inside registration assignment. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Authorization tuple containing prinicpal id of the + user/security group or service principal and id of the build-in role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :param managee_tenant_id: Id of the home tenant. + :type managee_tenant_id: str + :param managee_tenant_name: Name of the home tenant. + :type managee_tenant_name: str + :param managed_by_tenant_id: Id of the managedBy tenant. + :type managed_by_tenant_id: str + :param managed_by_tenant_name: Name of the managedBy tenant. + :type managed_by_tenant_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, + 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authorizations = kwargs.get('authorizations', None) + self.registration_definition_name = kwargs.get('registration_definition_name', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.managee_tenant_id = kwargs.get('managee_tenant_id', None) + self.managee_tenant_name = kwargs.get('managee_tenant_name', None) + self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) + self.managed_by_tenant_name = kwargs.get('managed_by_tenant_name', None) diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py new file mode 100644 index 000000000000..1db113732540 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py @@ -0,0 +1,62 @@ +# 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 RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): + """Properties of registration definition inside registration assignment. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Authorization tuple containing prinicpal id of the + user/security group or service principal and id of the build-in role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :param managee_tenant_id: Id of the home tenant. + :type managee_tenant_id: str + :param managee_tenant_name: Name of the home tenant. + :type managee_tenant_name: str + :param managed_by_tenant_id: Id of the managedBy tenant. + :type managed_by_tenant_id: str + :param managed_by_tenant_name: Name of the managedBy tenant. + :type managed_by_tenant_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, + 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, authorizations=None, registration_definition_name: str=None, provisioning_state=None, managee_tenant_id: str=None, managee_tenant_name: str=None, managed_by_tenant_id: str=None, managed_by_tenant_name: str=None, **kwargs) -> None: + super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = description + self.authorizations = authorizations + self.registration_definition_name = registration_definition_name + self.provisioning_state = provisioning_state + self.managee_tenant_id = managee_tenant_id + self.managee_tenant_name = managee_tenant_name + self.managed_by_tenant_id = managed_by_tenant_id + self.managed_by_tenant_name = managed_by_tenant_name diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py new file mode 100644 index 000000000000..9a5ef972e44c --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py @@ -0,0 +1,56 @@ +# 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 RegistrationAssignmentPropertiesRegistrationDefinition(Model): + """Registration definition inside registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of registration definition inside + registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties=None, plan=None, **kwargs) -> None: + super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) + self.properties = properties + self.plan = plan + self.id = None + self.type = None + self.name = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py new file mode 100644 index 000000000000..decb5b20b6c3 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_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 RegistrationAssignment(Model): + """Registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties + :ivar id: The fully qualified path of the registration assignment. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration assignment. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(RegistrationAssignment, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.type = None + self.name = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py new file mode 100644 index 000000000000..65c19f3f8daa --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py @@ -0,0 +1,54 @@ +# 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 RegistrationDefinition(Model): + """Registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration definition. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationDefinition, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.plan = kwargs.get('plan', None) + self.id = None + self.type = None + self.name = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py new file mode 100644 index 000000000000..9b51285427ae --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class RegistrationDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegistrationDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegistrationDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(RegistrationDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py new file mode 100644 index 000000000000..77745a5f991d --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py @@ -0,0 +1,67 @@ +# 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 RegistrationDefinitionProperties(Model): + """Properties of a registration definition. + + 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 description: Description of the registration definition. + :type description: str + :param authorizations: Required. Authorization tuple containing prinicpal + id of the user/security group or service principal and id of the build-in + role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :type managed_by_tenant_id: str + :ivar provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar managed_by_tenant_name: Name of the managedBy tenant. + :vartype managed_by_tenant_name: str + """ + + _validation = { + 'authorizations': {'required': True}, + 'managed_by_tenant_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'managed_by_tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authorizations = kwargs.get('authorizations', None) + self.registration_definition_name = kwargs.get('registration_definition_name', None) + self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) + self.provisioning_state = None + self.managed_by_tenant_name = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py new file mode 100644 index 000000000000..6c1d128fcafa --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py @@ -0,0 +1,67 @@ +# 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 RegistrationDefinitionProperties(Model): + """Properties of a registration definition. + + 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 description: Description of the registration definition. + :type description: str + :param authorizations: Required. Authorization tuple containing prinicpal + id of the user/security group or service principal and id of the build-in + role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :type managed_by_tenant_id: str + :ivar provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar managed_by_tenant_name: Name of the managedBy tenant. + :vartype managed_by_tenant_name: str + """ + + _validation = { + 'authorizations': {'required': True}, + 'managed_by_tenant_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'managed_by_tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'ProvisioningState'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, *, authorizations, managed_by_tenant_id: str, description: str=None, registration_definition_name: str=None, **kwargs) -> None: + super(RegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = description + self.authorizations = authorizations + self.registration_definition_name = registration_definition_name + self.managed_by_tenant_id = managed_by_tenant_id + self.provisioning_state = None + self.managed_by_tenant_name = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py new file mode 100644 index 000000000000..f570181a2764 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py @@ -0,0 +1,54 @@ +# 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 RegistrationDefinition(Model): + """Registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration definition. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties=None, plan=None, **kwargs) -> None: + super(RegistrationDefinition, self).__init__(**kwargs) + self.properties = properties + self.plan = plan + self.id = None + self.type = None + self.name = None diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py new file mode 100644 index 000000000000..f51ba517d417 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py @@ -0,0 +1,20 @@ +# 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 .registration_definitions_operations import RegistrationDefinitionsOperations +from .registration_assignments_operations import RegistrationAssignmentsOperations +from .operations import Operations + +__all__ = [ + 'RegistrationDefinitionsOperations', + 'RegistrationAssignmentsOperations', + 'Operations', +] diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py new file mode 100644 index 000000000000..85d385fc7869 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py @@ -0,0 +1,88 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def list( + self, api_version, custom_headers=None, raw=False, **operation_config): + """Gets a list of the operations. + + :param api_version: The API version to use for this operation. + :type api_version: 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: OperationList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managedservices.models.OperationList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ManagedServices/operations'} diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py new file mode 100644 index 000000000000..18d9efb3eee1 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py @@ -0,0 +1,311 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class RegistrationAssignmentsOperations(object): + """RegistrationAssignmentsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def get( + self, scope, registraton_assignment_id, api_version, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of specified registration assignment. + + :param scope: Id of the source subscription. + :type scope: str + :param registraton_assignment_id: Guid of the registration assignment. + :type registraton_assignment_id: str + :param api_version: The API version to use for this operation. + :type api_version: str + :param expand_registration_definition: Tells whether to return + registration definition details also along with registration + assingmnet details. + :type expand_registration_definition: bool + :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: RegistrationAssignment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managedservices.models.RegistrationAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'registratonAssignmentId': self._serialize.url("registraton_assignment_id", registraton_assignment_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand_registration_definition is not None: + query_parameters['$expandRegistrationDefinition'] = self._serialize.query("expand_registration_definition", expand_registration_definition, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistrationAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registratonAssignmentId}'} + + def delete( + self, scope, registraton_assignment_id, api_version, custom_headers=None, raw=False, **operation_config): + """Deletes the specified registration assignment. + + :param scope: Id of the source subscription. + :type scope: str + :param registraton_assignment_id: Guid of the registration assignment. + :type registraton_assignment_id: str + :param api_version: The API version to use for this operation. + :type api_version: 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: RegistrationAssignment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managedservices.models.RegistrationAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'registratonAssignmentId': self._serialize.url("registraton_assignment_id", registraton_assignment_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistrationAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registratonAssignmentId}'} + + def create_or_update( + self, scope, registraton_assignment_id, api_version, properties=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a registration assignment. + + :param scope: Id of the source subscription. + :type scope: str + :param registraton_assignment_id: Guid of the registration assignment. + :type registraton_assignment_id: str + :param api_version: The API version to use for this operation. + :type api_version: str + :param properties: Properties of a registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties + :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: RegistrationAssignment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managedservices.models.RegistrationAssignment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + request_body = models.RegistrationAssignment(properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'registratonAssignmentId': self._serialize.url("registraton_assignment_id", registraton_assignment_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", 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 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(request_body, 'RegistrationAssignment') + + # Construct and send request + request = self._client.put(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('RegistrationAssignment', response) + if response.status_code == 201: + deserialized = self._deserialize('RegistrationAssignment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registratonAssignmentId}'} + + def list( + self, scope, api_version, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of the registration assignments. + + :param scope: Id of the source subscription. + :type scope: str + :param api_version: The API version to use for this operation. + :type api_version: str + :param expand_registration_definition: Tells whether to return + registration definition details also along with registration + assingmnet details. + :type expand_registration_definition: bool + :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: An iterator like instance of RegistrationAssignment + :rtype: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPaged[~azure.mgmt.managedservices.models.RegistrationAssignment] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand_registration_definition is not None: + query_parameters['$expandRegistrationDefinition'] = self._serialize.query("expand_registration_definition", expand_registration_definition, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.RegistrationAssignmentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegistrationAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments'} diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py new file mode 100644 index 000000000000..d0b4927159e2 --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py @@ -0,0 +1,301 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class RegistrationDefinitionsOperations(object): + """RegistrationDefinitionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def get( + self, scope, registraton_definition_id, api_version, custom_headers=None, raw=False, **operation_config): + """Gets the registration definition details. + + :param scope: Id of the source subscription. + :type scope: str + :param registraton_definition_id: Guid of the registration definition. + :type registraton_definition_id: str + :param api_version: The API version to use for this operation. + :type api_version: 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: RegistrationDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managedservices.models.RegistrationDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'registratonDefinitionId': self._serialize.url("registraton_definition_id", registraton_definition_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistrationDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registratonDefinitionId}'} + + def delete( + self, registraton_definition_id, api_version, scope, custom_headers=None, raw=False, **operation_config): + """Deletes the registration definition. + + :param registraton_definition_id: Guid of the registration definition. + :type registraton_definition_id: str + :param api_version: The API version to use for this operation. + :type api_version: str + :param scope: Id of the source subscription. + :type scope: 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: RegistrationDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managedservices.models.RegistrationDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'registratonDefinitionId': self._serialize.url("registraton_definition_id", registraton_definition_id, 'str'), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RegistrationDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registratonDefinitionId}'} + + def create_or_update( + self, registraton_definition_id, api_version, scope, properties=None, plan=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a registration definition. + + :param registraton_definition_id: Guid of the registration definition. + :type registraton_definition_id: str + :param api_version: The API version to use for this operation. + :type api_version: str + :param scope: Id of the source subscription. + :type scope: str + :param properties: Properties of a registration definition. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :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: RegistrationDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managedservices.models.RegistrationDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + request_body = models.RegistrationDefinition(properties=properties, plan=plan) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'registratonDefinitionId': self._serialize.url("registraton_definition_id", registraton_definition_id, 'str'), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", 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 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(request_body, 'RegistrationDefinition') + + # Construct and send request + request = self._client.put(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('RegistrationDefinition', response) + if response.status_code == 201: + deserialized = self._deserialize('RegistrationDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registratonDefinitionId}'} + + def list( + self, scope, api_version, custom_headers=None, raw=False, **operation_config): + """Gets a list of the registration definitions. + + :param scope: Id of the source subscription. + :type scope: str + :param api_version: The API version to use for this operation. + :type api_version: 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: An iterator like instance of RegistrationDefinition + :rtype: + ~azure.mgmt.managedservices.models.RegistrationDefinitionPaged[~azure.mgmt.managedservices.models.RegistrationDefinition] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions'} diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/version.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/version.py new file mode 100644 index 000000000000..a39916c162ce --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0" + From 230657c567b16ffb2b02a95413509155d8c86244 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Thu, 21 Mar 2019 16:44:19 +0000 Subject: [PATCH 2/3] Packaging update of azure-mgmt-managedservices --- azure-mgmt-managedservices/HISTORY.rst | 9 ++ azure-mgmt-managedservices/MANIFEST.in | 5 ++ azure-mgmt-managedservices/README.rst | 33 +++++++ azure-mgmt-managedservices/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + azure-mgmt-managedservices/sdk_packaging.toml | 8 ++ azure-mgmt-managedservices/setup.cfg | 2 + azure-mgmt-managedservices/setup.py | 87 +++++++++++++++++++ 8 files changed, 146 insertions(+) create mode 100644 azure-mgmt-managedservices/HISTORY.rst create mode 100644 azure-mgmt-managedservices/MANIFEST.in create mode 100644 azure-mgmt-managedservices/README.rst create mode 100644 azure-mgmt-managedservices/azure/__init__.py create mode 100644 azure-mgmt-managedservices/azure/mgmt/__init__.py create mode 100644 azure-mgmt-managedservices/sdk_packaging.toml create mode 100644 azure-mgmt-managedservices/setup.cfg create mode 100644 azure-mgmt-managedservices/setup.py diff --git a/azure-mgmt-managedservices/HISTORY.rst b/azure-mgmt-managedservices/HISTORY.rst new file mode 100644 index 000000000000..8924d5d6c445 --- /dev/null +++ b/azure-mgmt-managedservices/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (1970-01-01) +++++++++++++++++++ + +* Initial Release diff --git a/azure-mgmt-managedservices/MANIFEST.in b/azure-mgmt-managedservices/MANIFEST.in new file mode 100644 index 000000000000..e4884efef41b --- /dev/null +++ b/azure-mgmt-managedservices/MANIFEST.in @@ -0,0 +1,5 @@ +recursive-include tests *.py *.yaml +include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-managedservices/README.rst b/azure-mgmt-managedservices/README.rst new file mode 100644 index 000000000000..6f8961ee598f --- /dev/null +++ b/azure-mgmt-managedservices/README.rst @@ -0,0 +1,33 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure MyService Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Usage +===== + +For code examples, see `MyService Management +`__ +on docs.microsoft.com. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-managedservices%2FREADME.png diff --git a/azure-mgmt-managedservices/azure/__init__.py b/azure-mgmt-managedservices/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-mgmt-managedservices/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-managedservices/azure/mgmt/__init__.py b/azure-mgmt-managedservices/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-mgmt-managedservices/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-managedservices/sdk_packaging.toml b/azure-mgmt-managedservices/sdk_packaging.toml new file mode 100644 index 000000000000..4efe35b2bf6c --- /dev/null +++ b/azure-mgmt-managedservices/sdk_packaging.toml @@ -0,0 +1,8 @@ +[packaging] +package_name = "azure-mgmt-managedservices" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "MyService Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = true diff --git a/azure-mgmt-managedservices/setup.cfg b/azure-mgmt-managedservices/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/azure-mgmt-managedservices/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/azure-mgmt-managedservices/setup.py b/azure-mgmt-managedservices/setup.py new file mode 100644 index 000000000000..e43dac611eb3 --- /dev/null +++ b/azure-mgmt-managedservices/setup.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-managedservices" +PACKAGE_PPRINT_NAME = "MyService Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + 'azure-common~=1.1', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +) From 6fc2c4d62df6d67446e74092da9b94d46d9d0d5a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 25 Mar 2019 17:50:10 +0000 Subject: [PATCH 3/3] Generated from 68de90ca9556a1be7e4ba6630ece46760cb219bf fix dup --- .../mgmt/managedservices/models/operation.py | 2 +- .../managedservices/models/operation_py3.py | 2 +- ...ties_registration_definition_properties.py | 2 +- ..._registration_definition_properties_py3.py | 2 +- .../registration_definition_properties.py | 2 +- .../registration_definition_properties_py3.py | 2 +- .../registration_assignments_operations.py | 45 ++++++++++--------- .../registration_definitions_operations.py | 41 +++++++++-------- .../azure/mgmt/managedservices/version.py | 2 +- 9 files changed, 53 insertions(+), 47 deletions(-) diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py index 7e49643561f5..2b4fc63804f8 100644 --- a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py @@ -13,7 +13,7 @@ class Operation(Model): - """Object that desctibes a single Microsoft.ManagedServices operation. + """Object that describes a single Microsoft.ManagedServices operation. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py index aa8fa421a794..afbd7d244ce4 100644 --- a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py @@ -13,7 +13,7 @@ class Operation(Model): - """Object that desctibes a single Microsoft.ManagedServices operation. + """Object that describes a single Microsoft.ManagedServices operation. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py index a138846084d8..c6c54637627c 100644 --- a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py @@ -17,7 +17,7 @@ class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): :param description: Description of the registration definition. :type description: str - :param authorizations: Authorization tuple containing prinicpal id of the + :param authorizations: Authorization tuple containing principal id of the user/security group or service principal and id of the build-in role. :type authorizations: list[~azure.mgmt.managedservices.models.Authorization] diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py index 1db113732540..c74e5cc908ee 100644 --- a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py @@ -17,7 +17,7 @@ class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): :param description: Description of the registration definition. :type description: str - :param authorizations: Authorization tuple containing prinicpal id of the + :param authorizations: Authorization tuple containing principal id of the user/security group or service principal and id of the build-in role. :type authorizations: list[~azure.mgmt.managedservices.models.Authorization] diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py index 77745a5f991d..7581c7921911 100644 --- a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py @@ -22,7 +22,7 @@ class RegistrationDefinitionProperties(Model): :param description: Description of the registration definition. :type description: str - :param authorizations: Required. Authorization tuple containing prinicpal + :param authorizations: Required. Authorization tuple containing principal id of the user/security group or service principal and id of the build-in role. :type authorizations: diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py index 6c1d128fcafa..c2f207bd5c21 100644 --- a/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py @@ -22,7 +22,7 @@ class RegistrationDefinitionProperties(Model): :param description: Description of the registration definition. :type description: str - :param authorizations: Required. Authorization tuple containing prinicpal + :param authorizations: Required. Authorization tuple containing principal id of the user/security group or service principal and id of the build-in role. :type authorizations: diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py index 18d9efb3eee1..325b9bec7e99 100644 --- a/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py @@ -35,18 +35,19 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, scope, registraton_assignment_id, api_version, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): + self, scope, registration_assignment_id, api_version, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): """Gets the details of specified registration assignment. - :param scope: Id of the source subscription. + :param scope: Scope of the resource. :type scope: str - :param registraton_assignment_id: Guid of the registration assignment. - :type registraton_assignment_id: str + :param registration_assignment_id: Guid of the registration + assignment. + :type registration_assignment_id: str :param api_version: The API version to use for this operation. :type api_version: str :param expand_registration_definition: Tells whether to return registration definition details also along with registration - assingmnet details. + assignment details. :type expand_registration_definition: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -63,7 +64,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'registratonAssignmentId': self._serialize.url("registraton_assignment_id", registraton_assignment_id, 'str') + 'registrationAssignmentId': self._serialize.url("registration_assignment_id", registration_assignment_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -100,16 +101,17 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registratonAssignmentId}'} + get.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registrationAssignmentId}'} def delete( - self, scope, registraton_assignment_id, api_version, custom_headers=None, raw=False, **operation_config): + self, scope, registration_assignment_id, api_version, custom_headers=None, raw=False, **operation_config): """Deletes the specified registration assignment. - :param scope: Id of the source subscription. + :param scope: Scope of the resource. :type scope: str - :param registraton_assignment_id: Guid of the registration assignment. - :type registraton_assignment_id: str + :param registration_assignment_id: Guid of the registration + assignment. + :type registration_assignment_id: str :param api_version: The API version to use for this operation. :type api_version: str :param dict custom_headers: headers that will be added to the request @@ -127,7 +129,7 @@ def delete( url = self.delete.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'registratonAssignmentId': self._serialize.url("registraton_assignment_id", registraton_assignment_id, 'str') + 'registrationAssignmentId': self._serialize.url("registration_assignment_id", registration_assignment_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -162,16 +164,17 @@ def delete( return client_raw_response return deserialized - delete.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registratonAssignmentId}'} + delete.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registrationAssignmentId}'} def create_or_update( - self, scope, registraton_assignment_id, api_version, properties=None, custom_headers=None, raw=False, **operation_config): + self, scope, registration_assignment_id, api_version, properties=None, custom_headers=None, raw=False, **operation_config): """Creates or updates a registration assignment. - :param scope: Id of the source subscription. + :param scope: Scope of the resource. :type scope: str - :param registraton_assignment_id: Guid of the registration assignment. - :type registraton_assignment_id: str + :param registration_assignment_id: Guid of the registration + assignment. + :type registration_assignment_id: str :param api_version: The API version to use for this operation. :type api_version: str :param properties: Properties of a registration assignment. @@ -194,7 +197,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'registratonAssignmentId': self._serialize.url("registraton_assignment_id", registraton_assignment_id, 'str') + 'registrationAssignmentId': self._serialize.url("registration_assignment_id", registration_assignment_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -235,19 +238,19 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registratonAssignmentId}'} + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registrationAssignmentId}'} def list( self, scope, api_version, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): """Gets a list of the registration assignments. - :param scope: Id of the source subscription. + :param scope: Scope of the resource. :type scope: str :param api_version: The API version to use for this operation. :type api_version: str :param expand_registration_definition: Tells whether to return registration definition details also along with registration - assingmnet details. + assignment details. :type expand_registration_definition: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py index d0b4927159e2..2d349517f994 100644 --- a/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py @@ -35,13 +35,14 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, scope, registraton_definition_id, api_version, custom_headers=None, raw=False, **operation_config): + self, scope, registration_definition_id, api_version, custom_headers=None, raw=False, **operation_config): """Gets the registration definition details. - :param scope: Id of the source subscription. + :param scope: Scope of the resource. :type scope: str - :param registraton_definition_id: Guid of the registration definition. - :type registraton_definition_id: str + :param registration_definition_id: Guid of the registration + definition. + :type registration_definition_id: str :param api_version: The API version to use for this operation. :type api_version: str :param dict custom_headers: headers that will be added to the request @@ -59,7 +60,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'registratonDefinitionId': self._serialize.url("registraton_definition_id", registraton_definition_id, 'str') + 'registrationDefinitionId': self._serialize.url("registration_definition_id", registration_definition_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -94,17 +95,18 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registratonDefinitionId}'} + get.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registrationDefinitionId}'} def delete( - self, registraton_definition_id, api_version, scope, custom_headers=None, raw=False, **operation_config): + self, registration_definition_id, api_version, scope, custom_headers=None, raw=False, **operation_config): """Deletes the registration definition. - :param registraton_definition_id: Guid of the registration definition. - :type registraton_definition_id: str + :param registration_definition_id: Guid of the registration + definition. + :type registration_definition_id: str :param api_version: The API version to use for this operation. :type api_version: str - :param scope: Id of the source subscription. + :param scope: Scope of the resource. :type scope: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -120,7 +122,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'registratonDefinitionId': self._serialize.url("registraton_definition_id", registraton_definition_id, 'str'), + 'registrationDefinitionId': self._serialize.url("registration_definition_id", registration_definition_id, 'str'), 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) @@ -156,17 +158,18 @@ def delete( return client_raw_response return deserialized - delete.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registratonDefinitionId}'} + delete.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registrationDefinitionId}'} def create_or_update( - self, registraton_definition_id, api_version, scope, properties=None, plan=None, custom_headers=None, raw=False, **operation_config): + self, registration_definition_id, api_version, scope, properties=None, plan=None, custom_headers=None, raw=False, **operation_config): """Creates or updates a registration definition. - :param registraton_definition_id: Guid of the registration definition. - :type registraton_definition_id: str + :param registration_definition_id: Guid of the registration + definition. + :type registration_definition_id: str :param api_version: The API version to use for this operation. :type api_version: str - :param scope: Id of the source subscription. + :param scope: Scope of the resource. :type scope: str :param properties: Properties of a registration definition. :type properties: @@ -189,7 +192,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'registratonDefinitionId': self._serialize.url("registraton_definition_id", registraton_definition_id, 'str'), + 'registrationDefinitionId': self._serialize.url("registration_definition_id", registration_definition_id, 'str'), 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) @@ -231,13 +234,13 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registratonDefinitionId}'} + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registrationDefinitionId}'} def list( self, scope, api_version, custom_headers=None, raw=False, **operation_config): """Gets a list of the registration definitions. - :param scope: Id of the source subscription. + :param scope: Scope of the resource. :type scope: str :param api_version: The API version to use for this operation. :type api_version: str diff --git a/azure-mgmt-managedservices/azure/mgmt/managedservices/version.py b/azure-mgmt-managedservices/azure/mgmt/managedservices/version.py index a39916c162ce..e0ec669828cb 100644 --- a/azure-mgmt-managedservices/azure/mgmt/managedservices/version.py +++ b/azure-mgmt-managedservices/azure/mgmt/managedservices/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "0.1.0"