diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/__init__.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/__init__.py index c7c15443cef0..02549f228560 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/__init__.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .dev_spaces_management_client import DevSpacesManagementClient -from .version import VERSION +from ._configuration import DevSpacesManagementClientConfiguration +from ._dev_spaces_management_client import DevSpacesManagementClient +__all__ = ['DevSpacesManagementClient', 'DevSpacesManagementClientConfiguration'] -__all__ = ['DevSpacesManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_configuration.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_configuration.py new file mode 100644 index 000000000000..e1137d2b2a2a --- /dev/null +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class DevSpacesManagementClientConfiguration(AzureConfiguration): + """Configuration for DevSpacesManagementClient + 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 subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DevSpacesManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-devspaces/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/dev_spaces_management_client.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_dev_spaces_management_client.py similarity index 61% rename from sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/dev_spaces_management_client.py rename to sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_dev_spaces_management_client.py index 8fab3db5da41..d9622cb62e75 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/dev_spaces_management_client.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_dev_spaces_management_client.py @@ -11,44 +11,12 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.container_host_mappings_operations import ContainerHostMappingsOperations -from .operations.operations import Operations -from .operations.controllers_operations import ControllersOperations -from . import models - - -class DevSpacesManagementClientConfiguration(AzureConfiguration): - """Configuration for DevSpacesManagementClient - 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 subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DevSpacesManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-devspaces/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import DevSpacesManagementClientConfiguration +from .operations import ContainerHostMappingsOperations +from .operations import Operations +from .operations import ControllersOperations +from . import models class DevSpacesManagementClient(SDKClient): diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py index ec13a481a4b8..031596fe3455 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py @@ -10,60 +10,60 @@ # -------------------------------------------------------------------------- try: - from .container_host_mapping_py3 import ContainerHostMapping - from .tracked_resource_py3 import TrackedResource - from .resource_provider_operation_display_py3 import ResourceProviderOperationDisplay - from .resource_provider_operation_definition_py3 import ResourceProviderOperationDefinition - from .sku_py3 import Sku - from .controller_py3 import Controller - from .controller_update_parameters_py3 import ControllerUpdateParameters - from .list_connection_details_parameters_py3 import ListConnectionDetailsParameters - from .orchestrator_specific_connection_details_py3 import OrchestratorSpecificConnectionDetails - from .controller_connection_details_py3 import ControllerConnectionDetails - from .controller_connection_details_list_py3 import ControllerConnectionDetailsList - from .resource_py3 import Resource - from .kubernetes_connection_details_py3 import KubernetesConnectionDetails - from .error_details_py3 import ErrorDetails - from .dev_spaces_error_response_py3 import DevSpacesErrorResponse, DevSpacesErrorResponseException + from ._models_py3 import ContainerHostMapping + from ._models_py3 import Controller + from ._models_py3 import ControllerConnectionDetails + from ._models_py3 import ControllerConnectionDetailsList + from ._models_py3 import ControllerUpdateParameters + from ._models_py3 import DevSpacesErrorResponse, DevSpacesErrorResponseException + from ._models_py3 import ErrorDetails + from ._models_py3 import KubernetesConnectionDetails + from ._models_py3 import ListConnectionDetailsParameters + from ._models_py3 import OrchestratorSpecificConnectionDetails + from ._models_py3 import Resource + from ._models_py3 import ResourceProviderOperationDefinition + from ._models_py3 import ResourceProviderOperationDisplay + from ._models_py3 import Sku + from ._models_py3 import TrackedResource except (SyntaxError, ImportError): - from .container_host_mapping import ContainerHostMapping - from .tracked_resource import TrackedResource - from .resource_provider_operation_display import ResourceProviderOperationDisplay - from .resource_provider_operation_definition import ResourceProviderOperationDefinition - from .sku import Sku - from .controller import Controller - from .controller_update_parameters import ControllerUpdateParameters - from .list_connection_details_parameters import ListConnectionDetailsParameters - from .orchestrator_specific_connection_details import OrchestratorSpecificConnectionDetails - from .controller_connection_details import ControllerConnectionDetails - from .controller_connection_details_list import ControllerConnectionDetailsList - from .resource import Resource - from .kubernetes_connection_details import KubernetesConnectionDetails - from .error_details import ErrorDetails - from .dev_spaces_error_response import DevSpacesErrorResponse, DevSpacesErrorResponseException -from .resource_provider_operation_definition_paged import ResourceProviderOperationDefinitionPaged -from .controller_paged import ControllerPaged -from .dev_spaces_management_client_enums import ( + from ._models import ContainerHostMapping + from ._models import Controller + from ._models import ControllerConnectionDetails + from ._models import ControllerConnectionDetailsList + from ._models import ControllerUpdateParameters + from ._models import DevSpacesErrorResponse, DevSpacesErrorResponseException + from ._models import ErrorDetails + from ._models import KubernetesConnectionDetails + from ._models import ListConnectionDetailsParameters + from ._models import OrchestratorSpecificConnectionDetails + from ._models import Resource + from ._models import ResourceProviderOperationDefinition + from ._models import ResourceProviderOperationDisplay + from ._models import Sku + from ._models import TrackedResource +from ._paged_models import ControllerPaged +from ._paged_models import ResourceProviderOperationDefinitionPaged +from ._dev_spaces_management_client_enums import ( ProvisioningState, SkuTier, ) __all__ = [ 'ContainerHostMapping', - 'TrackedResource', - 'ResourceProviderOperationDisplay', - 'ResourceProviderOperationDefinition', - 'Sku', 'Controller', + 'ControllerConnectionDetails', + 'ControllerConnectionDetailsList', 'ControllerUpdateParameters', + 'DevSpacesErrorResponse', 'DevSpacesErrorResponseException', + 'ErrorDetails', + 'KubernetesConnectionDetails', 'ListConnectionDetailsParameters', 'OrchestratorSpecificConnectionDetails', - 'ControllerConnectionDetails', - 'ControllerConnectionDetailsList', 'Resource', - 'KubernetesConnectionDetails', - 'ErrorDetails', - 'DevSpacesErrorResponse', 'DevSpacesErrorResponseException', + 'ResourceProviderOperationDefinition', + 'ResourceProviderOperationDisplay', + 'Sku', + 'TrackedResource', 'ResourceProviderOperationDefinitionPaged', 'ControllerPaged', 'ProvisioningState', diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_management_client_enums.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_dev_spaces_management_client_enums.py similarity index 100% rename from sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_management_client_enums.py rename to sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_dev_spaces_management_client_enums.py diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_models.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_models.py new file mode 100644 index 000000000000..a155a0c14428 --- /dev/null +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_models.py @@ -0,0 +1,474 @@ +# 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ContainerHostMapping(Model): + """Container host mapping object specifying the Container host resource ID and + its associated Controller resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param container_host_resource_id: ARM ID of the Container Host resource + :type container_host_resource_id: str + :ivar mapped_controller_resource_id: ARM ID of the mapped Controller + resource + :vartype mapped_controller_resource_id: str + """ + + _validation = { + 'mapped_controller_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'container_host_resource_id': {'key': 'containerHostResourceId', 'type': 'str'}, + 'mapped_controller_resource_id': {'key': 'mappedControllerResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerHostMapping, self).__init__(**kwargs) + self.container_host_resource_id = kwargs.get('container_host_resource_id', None) + self.mapped_controller_resource_id = None + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param tags: Tags for the Azure resource. + :type tags: dict[str, str] + :param location: Region where the Azure resource is located. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class Controller(TrackedResource): + """Controller. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param tags: Tags for the Azure resource. + :type tags: dict[str, str] + :param location: Region where the Azure resource is located. + :type location: str + :ivar provisioning_state: Provisioning state of the Azure Dev Spaces + Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Updating', 'Creating', 'Deleting', 'Deleted' + :vartype provisioning_state: str or + ~azure.mgmt.devspaces.models.ProvisioningState + :ivar host_suffix: DNS suffix for public endpoints running in the Azure + Dev Spaces Controller. + :vartype host_suffix: str + :ivar data_plane_fqdn: DNS name for accessing DataPlane services + :vartype data_plane_fqdn: str + :param target_container_host_resource_id: Required. Resource ID of the + target container host + :type target_container_host_resource_id: str + :param target_container_host_credentials_base64: Required. Credentials of + the target container host (base64). + :type target_container_host_credentials_base64: str + :param sku: Required. + :type sku: ~azure.mgmt.devspaces.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'host_suffix': {'readonly': True}, + 'data_plane_fqdn': {'readonly': True}, + 'target_container_host_resource_id': {'required': True}, + 'target_container_host_credentials_base64': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_suffix': {'key': 'properties.hostSuffix', 'type': 'str'}, + 'data_plane_fqdn': {'key': 'properties.dataPlaneFqdn', 'type': 'str'}, + 'target_container_host_resource_id': {'key': 'properties.targetContainerHostResourceId', 'type': 'str'}, + 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(Controller, self).__init__(**kwargs) + self.provisioning_state = None + self.host_suffix = None + self.data_plane_fqdn = None + self.target_container_host_resource_id = kwargs.get('target_container_host_resource_id', None) + self.target_container_host_credentials_base64 = kwargs.get('target_container_host_credentials_base64', None) + self.sku = kwargs.get('sku', None) + + +class ControllerConnectionDetails(Model): + """ControllerConnectionDetails. + + :param orchestrator_specific_connection_details: + :type orchestrator_specific_connection_details: + ~azure.mgmt.devspaces.models.OrchestratorSpecificConnectionDetails + """ + + _attribute_map = { + 'orchestrator_specific_connection_details': {'key': 'orchestratorSpecificConnectionDetails', 'type': 'OrchestratorSpecificConnectionDetails'}, + } + + def __init__(self, **kwargs): + super(ControllerConnectionDetails, self).__init__(**kwargs) + self.orchestrator_specific_connection_details = kwargs.get('orchestrator_specific_connection_details', None) + + +class ControllerConnectionDetailsList(Model): + """ControllerConnectionDetailsList. + + :param connection_details_list: List of Azure Dev Spaces Controller + connection details. + :type connection_details_list: + list[~azure.mgmt.devspaces.models.ControllerConnectionDetails] + """ + + _attribute_map = { + 'connection_details_list': {'key': 'connectionDetailsList', 'type': '[ControllerConnectionDetails]'}, + } + + def __init__(self, **kwargs): + super(ControllerConnectionDetailsList, self).__init__(**kwargs) + self.connection_details_list = kwargs.get('connection_details_list', None) + + +class ControllerUpdateParameters(Model): + """Parameters for updating an Azure Dev Spaces Controller. + + :param tags: Tags for the Azure Dev Spaces Controller. + :type tags: dict[str, str] + :param target_container_host_credentials_base64: Credentials of the target + container host (base64). + :type target_container_host_credentials_base64: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ControllerUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.target_container_host_credentials_base64 = kwargs.get('target_container_host_credentials_base64', None) + + +class DevSpacesErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.devspaces.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, **kwargs): + super(DevSpacesErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class DevSpacesErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DevSpacesErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DevSpacesErrorResponseException, self).__init__(deserialize, response, 'DevSpacesErrorResponse', *args) + + +class ErrorDetails(Model): + """ErrorDetails. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Status code for the error. + :vartype code: str + :ivar message: Error message describing the error in detail. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class OrchestratorSpecificConnectionDetails(Model): + """Base class for types that supply values used to connect to container + orchestrators. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KubernetesConnectionDetails + + All required parameters must be populated in order to send to Azure. + + :param instance_type: Required. Constant filled by server. + :type instance_type: str + """ + + _validation = { + 'instance_type': {'required': True}, + } + + _attribute_map = { + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + } + + _subtype_map = { + 'instance_type': {'Kubernetes': 'KubernetesConnectionDetails'} + } + + def __init__(self, **kwargs): + super(OrchestratorSpecificConnectionDetails, self).__init__(**kwargs) + self.instance_type = None + + +class KubernetesConnectionDetails(OrchestratorSpecificConnectionDetails): + """Contains information used to connect to a Kubernetes cluster. + + All required parameters must be populated in order to send to Azure. + + :param instance_type: Required. Constant filled by server. + :type instance_type: str + :param kube_config: Gets the kubeconfig for the cluster. + :type kube_config: str + """ + + _validation = { + 'instance_type': {'required': True}, + } + + _attribute_map = { + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KubernetesConnectionDetails, self).__init__(**kwargs) + self.kube_config = kwargs.get('kube_config', None) + self.instance_type = 'Kubernetes' + + +class ListConnectionDetailsParameters(Model): + """Parameters for listing connection details of an Azure Dev Spaces + Controller. + + All required parameters must be populated in order to send to Azure. + + :param target_container_host_resource_id: Required. Resource ID of the + target container host mapped to the Azure Dev Spaces Controller. + :type target_container_host_resource_id: str + """ + + _validation = { + 'target_container_host_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_container_host_resource_id': {'key': 'targetContainerHostResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListConnectionDetailsParameters, self).__init__(**kwargs) + self.target_container_host_resource_id = kwargs.get('target_container_host_resource_id', None) + + +class ResourceProviderOperationDefinition(Model): + """ResourceProviderOperationDefinition. + + :param name: Resource provider operation name. + :type name: str + :param display: + :type display: + ~azure.mgmt.devspaces.models.ResourceProviderOperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + } + + def __init__(self, **kwargs): + super(ResourceProviderOperationDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class ResourceProviderOperationDisplay(Model): + """ResourceProviderOperationDisplay. + + :param provider: Name of the resource provider. + :type provider: str + :param resource: Name of the resource type. + :type resource: str + :param operation: Name of the resource provider operation. + :type operation: str + :param description: Description of the resource provider 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(ResourceProviderOperationDisplay, 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) + + +class Sku(Model): + """Model representing SKU for Azure Dev Spaces Controller. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the SKU for Azure Dev Spaces Controller. + Default value: "S1" . + :vartype name: str + :param tier: The tier of the SKU for Azure Dev Spaces Controller. Possible + values include: 'Standard' + :type tier: str or ~azure.mgmt.devspaces.models.SkuTier + """ + + _validation = { + 'name': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + name = "S1" + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.tier = kwargs.get('tier', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_models_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_models_py3.py new file mode 100644 index 000000000000..c6db32f236e7 --- /dev/null +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_models_py3.py @@ -0,0 +1,474 @@ +# 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ContainerHostMapping(Model): + """Container host mapping object specifying the Container host resource ID and + its associated Controller resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param container_host_resource_id: ARM ID of the Container Host resource + :type container_host_resource_id: str + :ivar mapped_controller_resource_id: ARM ID of the mapped Controller + resource + :vartype mapped_controller_resource_id: str + """ + + _validation = { + 'mapped_controller_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'container_host_resource_id': {'key': 'containerHostResourceId', 'type': 'str'}, + 'mapped_controller_resource_id': {'key': 'mappedControllerResourceId', 'type': 'str'}, + } + + def __init__(self, *, container_host_resource_id: str=None, **kwargs) -> None: + super(ContainerHostMapping, self).__init__(**kwargs) + self.container_host_resource_id = container_host_resource_id + self.mapped_controller_resource_id = None + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param tags: Tags for the Azure resource. + :type tags: dict[str, str] + :param location: Region where the Azure resource is located. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, tags=None, location: str=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class Controller(TrackedResource): + """Controller. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param tags: Tags for the Azure resource. + :type tags: dict[str, str] + :param location: Region where the Azure resource is located. + :type location: str + :ivar provisioning_state: Provisioning state of the Azure Dev Spaces + Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Updating', 'Creating', 'Deleting', 'Deleted' + :vartype provisioning_state: str or + ~azure.mgmt.devspaces.models.ProvisioningState + :ivar host_suffix: DNS suffix for public endpoints running in the Azure + Dev Spaces Controller. + :vartype host_suffix: str + :ivar data_plane_fqdn: DNS name for accessing DataPlane services + :vartype data_plane_fqdn: str + :param target_container_host_resource_id: Required. Resource ID of the + target container host + :type target_container_host_resource_id: str + :param target_container_host_credentials_base64: Required. Credentials of + the target container host (base64). + :type target_container_host_credentials_base64: str + :param sku: Required. + :type sku: ~azure.mgmt.devspaces.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'host_suffix': {'readonly': True}, + 'data_plane_fqdn': {'readonly': True}, + 'target_container_host_resource_id': {'required': True}, + 'target_container_host_credentials_base64': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_suffix': {'key': 'properties.hostSuffix', 'type': 'str'}, + 'data_plane_fqdn': {'key': 'properties.dataPlaneFqdn', 'type': 'str'}, + 'target_container_host_resource_id': {'key': 'properties.targetContainerHostResourceId', 'type': 'str'}, + 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, target_container_host_resource_id: str, target_container_host_credentials_base64: str, sku, tags=None, location: str=None, **kwargs) -> None: + super(Controller, self).__init__(tags=tags, location=location, **kwargs) + self.provisioning_state = None + self.host_suffix = None + self.data_plane_fqdn = None + self.target_container_host_resource_id = target_container_host_resource_id + self.target_container_host_credentials_base64 = target_container_host_credentials_base64 + self.sku = sku + + +class ControllerConnectionDetails(Model): + """ControllerConnectionDetails. + + :param orchestrator_specific_connection_details: + :type orchestrator_specific_connection_details: + ~azure.mgmt.devspaces.models.OrchestratorSpecificConnectionDetails + """ + + _attribute_map = { + 'orchestrator_specific_connection_details': {'key': 'orchestratorSpecificConnectionDetails', 'type': 'OrchestratorSpecificConnectionDetails'}, + } + + def __init__(self, *, orchestrator_specific_connection_details=None, **kwargs) -> None: + super(ControllerConnectionDetails, self).__init__(**kwargs) + self.orchestrator_specific_connection_details = orchestrator_specific_connection_details + + +class ControllerConnectionDetailsList(Model): + """ControllerConnectionDetailsList. + + :param connection_details_list: List of Azure Dev Spaces Controller + connection details. + :type connection_details_list: + list[~azure.mgmt.devspaces.models.ControllerConnectionDetails] + """ + + _attribute_map = { + 'connection_details_list': {'key': 'connectionDetailsList', 'type': '[ControllerConnectionDetails]'}, + } + + def __init__(self, *, connection_details_list=None, **kwargs) -> None: + super(ControllerConnectionDetailsList, self).__init__(**kwargs) + self.connection_details_list = connection_details_list + + +class ControllerUpdateParameters(Model): + """Parameters for updating an Azure Dev Spaces Controller. + + :param tags: Tags for the Azure Dev Spaces Controller. + :type tags: dict[str, str] + :param target_container_host_credentials_base64: Credentials of the target + container host (base64). + :type target_container_host_credentials_base64: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, + } + + def __init__(self, *, tags=None, target_container_host_credentials_base64: str=None, **kwargs) -> None: + super(ControllerUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.target_container_host_credentials_base64 = target_container_host_credentials_base64 + + +class DevSpacesErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.devspaces.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(DevSpacesErrorResponse, self).__init__(**kwargs) + self.error = error + + +class DevSpacesErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DevSpacesErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(DevSpacesErrorResponseException, self).__init__(deserialize, response, 'DevSpacesErrorResponse', *args) + + +class ErrorDetails(Model): + """ErrorDetails. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Status code for the error. + :vartype code: str + :ivar message: Error message describing the error in detail. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class OrchestratorSpecificConnectionDetails(Model): + """Base class for types that supply values used to connect to container + orchestrators. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KubernetesConnectionDetails + + All required parameters must be populated in order to send to Azure. + + :param instance_type: Required. Constant filled by server. + :type instance_type: str + """ + + _validation = { + 'instance_type': {'required': True}, + } + + _attribute_map = { + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + } + + _subtype_map = { + 'instance_type': {'Kubernetes': 'KubernetesConnectionDetails'} + } + + def __init__(self, **kwargs) -> None: + super(OrchestratorSpecificConnectionDetails, self).__init__(**kwargs) + self.instance_type = None + + +class KubernetesConnectionDetails(OrchestratorSpecificConnectionDetails): + """Contains information used to connect to a Kubernetes cluster. + + All required parameters must be populated in order to send to Azure. + + :param instance_type: Required. Constant filled by server. + :type instance_type: str + :param kube_config: Gets the kubeconfig for the cluster. + :type kube_config: str + """ + + _validation = { + 'instance_type': {'required': True}, + } + + _attribute_map = { + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, + } + + def __init__(self, *, kube_config: str=None, **kwargs) -> None: + super(KubernetesConnectionDetails, self).__init__(**kwargs) + self.kube_config = kube_config + self.instance_type = 'Kubernetes' + + +class ListConnectionDetailsParameters(Model): + """Parameters for listing connection details of an Azure Dev Spaces + Controller. + + All required parameters must be populated in order to send to Azure. + + :param target_container_host_resource_id: Required. Resource ID of the + target container host mapped to the Azure Dev Spaces Controller. + :type target_container_host_resource_id: str + """ + + _validation = { + 'target_container_host_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_container_host_resource_id': {'key': 'targetContainerHostResourceId', 'type': 'str'}, + } + + def __init__(self, *, target_container_host_resource_id: str, **kwargs) -> None: + super(ListConnectionDetailsParameters, self).__init__(**kwargs) + self.target_container_host_resource_id = target_container_host_resource_id + + +class ResourceProviderOperationDefinition(Model): + """ResourceProviderOperationDefinition. + + :param name: Resource provider operation name. + :type name: str + :param display: + :type display: + ~azure.mgmt.devspaces.models.ResourceProviderOperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(ResourceProviderOperationDefinition, self).__init__(**kwargs) + self.name = name + self.display = display + + +class ResourceProviderOperationDisplay(Model): + """ResourceProviderOperationDisplay. + + :param provider: Name of the resource provider. + :type provider: str + :param resource: Name of the resource type. + :type resource: str + :param operation: Name of the resource provider operation. + :type operation: str + :param description: Description of the resource provider 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(ResourceProviderOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Sku(Model): + """Model representing SKU for Azure Dev Spaces Controller. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the SKU for Azure Dev Spaces Controller. + Default value: "S1" . + :vartype name: str + :param tier: The tier of the SKU for Azure Dev Spaces Controller. Possible + values include: 'Standard' + :type tier: str or ~azure.mgmt.devspaces.models.SkuTier + """ + + _validation = { + 'name': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + name = "S1" + + def __init__(self, *, tier=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.tier = tier diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_paged.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_paged_models.py similarity index 71% rename from sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_paged.py rename to sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_paged_models.py index 4105598d2244..60f70ee7d27d 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_paged.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_paged_models.py @@ -25,3 +25,16 @@ class ResourceProviderOperationDefinitionPaged(Paged): def __init__(self, *args, **kwargs): super(ResourceProviderOperationDefinitionPaged, self).__init__(*args, **kwargs) +class ControllerPaged(Paged): + """ + A paging container for iterating over a list of :class:`Controller ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Controller]'} + } + + def __init__(self, *args, **kwargs): + + super(ControllerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping.py deleted file mode 100644 index 893bc7f395cb..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 ContainerHostMapping(Model): - """Container host mapping object specifying the Container host resource ID and - its associated Controller resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param container_host_resource_id: ARM ID of the Container Host resource - :type container_host_resource_id: str - :ivar mapped_controller_resource_id: ARM ID of the mapped Controller - resource - :vartype mapped_controller_resource_id: str - """ - - _validation = { - 'mapped_controller_resource_id': {'readonly': True}, - } - - _attribute_map = { - 'container_host_resource_id': {'key': 'containerHostResourceId', 'type': 'str'}, - 'mapped_controller_resource_id': {'key': 'mappedControllerResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerHostMapping, self).__init__(**kwargs) - self.container_host_resource_id = kwargs.get('container_host_resource_id', None) - self.mapped_controller_resource_id = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping_py3.py deleted file mode 100644 index d3dd56a2e029..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/container_host_mapping_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 ContainerHostMapping(Model): - """Container host mapping object specifying the Container host resource ID and - its associated Controller resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param container_host_resource_id: ARM ID of the Container Host resource - :type container_host_resource_id: str - :ivar mapped_controller_resource_id: ARM ID of the mapped Controller - resource - :vartype mapped_controller_resource_id: str - """ - - _validation = { - 'mapped_controller_resource_id': {'readonly': True}, - } - - _attribute_map = { - 'container_host_resource_id': {'key': 'containerHostResourceId', 'type': 'str'}, - 'mapped_controller_resource_id': {'key': 'mappedControllerResourceId', 'type': 'str'}, - } - - def __init__(self, *, container_host_resource_id: str=None, **kwargs) -> None: - super(ContainerHostMapping, self).__init__(**kwargs) - self.container_host_resource_id = container_host_resource_id - self.mapped_controller_resource_id = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller.py deleted file mode 100644 index 87580d5b1d7e..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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 .tracked_resource import TrackedResource - - -class Controller(TrackedResource): - """Controller. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param tags: Tags for the Azure resource. - :type tags: dict[str, str] - :param location: Region where the Azure resource is located. - :type location: str - :ivar provisioning_state: Provisioning state of the Azure Dev Spaces - Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Updating', 'Creating', 'Deleting', 'Deleted' - :vartype provisioning_state: str or - ~azure.mgmt.devspaces.models.ProvisioningState - :ivar host_suffix: DNS suffix for public endpoints running in the Azure - Dev Spaces Controller. - :vartype host_suffix: str - :ivar data_plane_fqdn: DNS name for accessing DataPlane services - :vartype data_plane_fqdn: str - :param target_container_host_resource_id: Required. Resource ID of the - target container host - :type target_container_host_resource_id: str - :param target_container_host_credentials_base64: Required. Credentials of - the target container host (base64). - :type target_container_host_credentials_base64: str - :param sku: Required. - :type sku: ~azure.mgmt.devspaces.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'host_suffix': {'readonly': True}, - 'data_plane_fqdn': {'readonly': True}, - 'target_container_host_resource_id': {'required': True}, - 'target_container_host_credentials_base64': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'host_suffix': {'key': 'properties.hostSuffix', 'type': 'str'}, - 'data_plane_fqdn': {'key': 'properties.dataPlaneFqdn', 'type': 'str'}, - 'target_container_host_resource_id': {'key': 'properties.targetContainerHostResourceId', 'type': 'str'}, - 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(Controller, self).__init__(**kwargs) - self.provisioning_state = None - self.host_suffix = None - self.data_plane_fqdn = None - self.target_container_host_resource_id = kwargs.get('target_container_host_resource_id', None) - self.target_container_host_credentials_base64 = kwargs.get('target_container_host_credentials_base64', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details.py deleted file mode 100644 index 9cede3fd6c76..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 ControllerConnectionDetails(Model): - """ControllerConnectionDetails. - - :param orchestrator_specific_connection_details: - :type orchestrator_specific_connection_details: - ~azure.mgmt.devspaces.models.OrchestratorSpecificConnectionDetails - """ - - _attribute_map = { - 'orchestrator_specific_connection_details': {'key': 'orchestratorSpecificConnectionDetails', 'type': 'OrchestratorSpecificConnectionDetails'}, - } - - def __init__(self, **kwargs): - super(ControllerConnectionDetails, self).__init__(**kwargs) - self.orchestrator_specific_connection_details = kwargs.get('orchestrator_specific_connection_details', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list.py deleted file mode 100644 index 20080c760ab4..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 ControllerConnectionDetailsList(Model): - """ControllerConnectionDetailsList. - - :param connection_details_list: List of Azure Dev Spaces Controller - connection details. - :type connection_details_list: - list[~azure.mgmt.devspaces.models.ControllerConnectionDetails] - """ - - _attribute_map = { - 'connection_details_list': {'key': 'connectionDetailsList', 'type': '[ControllerConnectionDetails]'}, - } - - def __init__(self, **kwargs): - super(ControllerConnectionDetailsList, self).__init__(**kwargs) - self.connection_details_list = kwargs.get('connection_details_list', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list_py3.py deleted file mode 100644 index 73f94653d0f7..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 ControllerConnectionDetailsList(Model): - """ControllerConnectionDetailsList. - - :param connection_details_list: List of Azure Dev Spaces Controller - connection details. - :type connection_details_list: - list[~azure.mgmt.devspaces.models.ControllerConnectionDetails] - """ - - _attribute_map = { - 'connection_details_list': {'key': 'connectionDetailsList', 'type': '[ControllerConnectionDetails]'}, - } - - def __init__(self, *, connection_details_list=None, **kwargs) -> None: - super(ControllerConnectionDetailsList, self).__init__(**kwargs) - self.connection_details_list = connection_details_list diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_py3.py deleted file mode 100644 index c63644e8d743..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 ControllerConnectionDetails(Model): - """ControllerConnectionDetails. - - :param orchestrator_specific_connection_details: - :type orchestrator_specific_connection_details: - ~azure.mgmt.devspaces.models.OrchestratorSpecificConnectionDetails - """ - - _attribute_map = { - 'orchestrator_specific_connection_details': {'key': 'orchestratorSpecificConnectionDetails', 'type': 'OrchestratorSpecificConnectionDetails'}, - } - - def __init__(self, *, orchestrator_specific_connection_details=None, **kwargs) -> None: - super(ControllerConnectionDetails, self).__init__(**kwargs) - self.orchestrator_specific_connection_details = orchestrator_specific_connection_details diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_paged.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_paged.py deleted file mode 100644 index 538f662aaad1..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ControllerPaged(Paged): - """ - A paging container for iterating over a list of :class:`Controller ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Controller]'} - } - - def __init__(self, *args, **kwargs): - - super(ControllerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_py3.py deleted file mode 100644 index a24c6a8042dd..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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 .tracked_resource_py3 import TrackedResource - - -class Controller(TrackedResource): - """Controller. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param tags: Tags for the Azure resource. - :type tags: dict[str, str] - :param location: Region where the Azure resource is located. - :type location: str - :ivar provisioning_state: Provisioning state of the Azure Dev Spaces - Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled', - 'Updating', 'Creating', 'Deleting', 'Deleted' - :vartype provisioning_state: str or - ~azure.mgmt.devspaces.models.ProvisioningState - :ivar host_suffix: DNS suffix for public endpoints running in the Azure - Dev Spaces Controller. - :vartype host_suffix: str - :ivar data_plane_fqdn: DNS name for accessing DataPlane services - :vartype data_plane_fqdn: str - :param target_container_host_resource_id: Required. Resource ID of the - target container host - :type target_container_host_resource_id: str - :param target_container_host_credentials_base64: Required. Credentials of - the target container host (base64). - :type target_container_host_credentials_base64: str - :param sku: Required. - :type sku: ~azure.mgmt.devspaces.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'host_suffix': {'readonly': True}, - 'data_plane_fqdn': {'readonly': True}, - 'target_container_host_resource_id': {'required': True}, - 'target_container_host_credentials_base64': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'host_suffix': {'key': 'properties.hostSuffix', 'type': 'str'}, - 'data_plane_fqdn': {'key': 'properties.dataPlaneFqdn', 'type': 'str'}, - 'target_container_host_resource_id': {'key': 'properties.targetContainerHostResourceId', 'type': 'str'}, - 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, target_container_host_resource_id: str, target_container_host_credentials_base64: str, sku, tags=None, location: str=None, **kwargs) -> None: - super(Controller, self).__init__(tags=tags, location=location, **kwargs) - self.provisioning_state = None - self.host_suffix = None - self.data_plane_fqdn = None - self.target_container_host_resource_id = target_container_host_resource_id - self.target_container_host_credentials_base64 = target_container_host_credentials_base64 - self.sku = sku diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.py deleted file mode 100644 index 89c4af59b22b..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 ControllerUpdateParameters(Model): - """Parameters for updating an Azure Dev Spaces Controller. - - :param tags: Tags for the Azure Dev Spaces Controller. - :type tags: dict[str, str] - :param target_container_host_credentials_base64: Credentials of the target - container host (base64). - :type target_container_host_credentials_base64: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ControllerUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.target_container_host_credentials_base64 = kwargs.get('target_container_host_credentials_base64', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_py3.py deleted file mode 100644 index 59d0b1bb6749..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 ControllerUpdateParameters(Model): - """Parameters for updating an Azure Dev Spaces Controller. - - :param tags: Tags for the Azure Dev Spaces Controller. - :type tags: dict[str, str] - :param target_container_host_credentials_base64: Credentials of the target - container host (base64). - :type target_container_host_credentials_base64: str - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, - } - - def __init__(self, *, tags=None, target_container_host_credentials_base64: str=None, **kwargs) -> None: - super(ControllerUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.target_container_host_credentials_base64 = target_container_host_credentials_base64 diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response.py deleted file mode 100644 index a73eee9a345b..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 DevSpacesErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.devspaces.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, **kwargs): - super(DevSpacesErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class DevSpacesErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DevSpacesErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DevSpacesErrorResponseException, self).__init__(deserialize, response, 'DevSpacesErrorResponse', *args) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response_py3.py deleted file mode 100644 index e5d4da727637..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 DevSpacesErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.devspaces.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(DevSpacesErrorResponse, self).__init__(**kwargs) - self.error = error - - -class DevSpacesErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'DevSpacesErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(DevSpacesErrorResponseException, self).__init__(deserialize, response, 'DevSpacesErrorResponse', *args) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details.py deleted file mode 100644 index 9583fed7fc84..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetails(Model): - """ErrorDetails. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Status code for the error. - :vartype code: str - :ivar message: Error message describing the error in detail. - :vartype message: str - :ivar target: The target of the particular error. - :vartype target: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details_py3.py deleted file mode 100644 index 8b8c7492d94a..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_details_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetails(Model): - """ErrorDetails. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Status code for the error. - :vartype code: str - :ivar message: Error message describing the error in detail. - :vartype message: str - :ivar target: The target of the particular error. - :vartype target: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details.py deleted file mode 100644 index e7175c8c1ab3..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 .orchestrator_specific_connection_details import OrchestratorSpecificConnectionDetails - - -class KubernetesConnectionDetails(OrchestratorSpecificConnectionDetails): - """Contains information used to connect to a Kubernetes cluster. - - All required parameters must be populated in order to send to Azure. - - :param instance_type: Required. Constant filled by server. - :type instance_type: str - :param kube_config: Gets the kubeconfig for the cluster. - :type kube_config: str - """ - - _validation = { - 'instance_type': {'required': True}, - } - - _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KubernetesConnectionDetails, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) - self.instance_type = 'Kubernetes' diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details_py3.py deleted file mode 100644 index 143bb5a98963..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/kubernetes_connection_details_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 .orchestrator_specific_connection_details_py3 import OrchestratorSpecificConnectionDetails - - -class KubernetesConnectionDetails(OrchestratorSpecificConnectionDetails): - """Contains information used to connect to a Kubernetes cluster. - - All required parameters must be populated in order to send to Azure. - - :param instance_type: Required. Constant filled by server. - :type instance_type: str - :param kube_config: Gets the kubeconfig for the cluster. - :type kube_config: str - """ - - _validation = { - 'instance_type': {'required': True}, - } - - _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'kube_config': {'key': 'kubeConfig', 'type': 'str'}, - } - - def __init__(self, *, kube_config: str=None, **kwargs) -> None: - super(KubernetesConnectionDetails, self).__init__(**kwargs) - self.kube_config = kube_config - self.instance_type = 'Kubernetes' diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters.py deleted file mode 100644 index 8aa1a6556b5a..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 ListConnectionDetailsParameters(Model): - """Parameters for listing connection details of an Azure Dev Spaces - Controller. - - All required parameters must be populated in order to send to Azure. - - :param target_container_host_resource_id: Required. Resource ID of the - target container host mapped to the Azure Dev Spaces Controller. - :type target_container_host_resource_id: str - """ - - _validation = { - 'target_container_host_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_container_host_resource_id': {'key': 'targetContainerHostResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ListConnectionDetailsParameters, self).__init__(**kwargs) - self.target_container_host_resource_id = kwargs.get('target_container_host_resource_id', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters_py3.py deleted file mode 100644 index 1ec148d8c07f..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/list_connection_details_parameters_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 ListConnectionDetailsParameters(Model): - """Parameters for listing connection details of an Azure Dev Spaces - Controller. - - All required parameters must be populated in order to send to Azure. - - :param target_container_host_resource_id: Required. Resource ID of the - target container host mapped to the Azure Dev Spaces Controller. - :type target_container_host_resource_id: str - """ - - _validation = { - 'target_container_host_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_container_host_resource_id': {'key': 'targetContainerHostResourceId', 'type': 'str'}, - } - - def __init__(self, *, target_container_host_resource_id: str, **kwargs) -> None: - super(ListConnectionDetailsParameters, self).__init__(**kwargs) - self.target_container_host_resource_id = target_container_host_resource_id diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details.py deleted file mode 100644 index cde860d75d2a..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 OrchestratorSpecificConnectionDetails(Model): - """Base class for types that supply values used to connect to container - orchestrators. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KubernetesConnectionDetails - - All required parameters must be populated in order to send to Azure. - - :param instance_type: Required. Constant filled by server. - :type instance_type: str - """ - - _validation = { - 'instance_type': {'required': True}, - } - - _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - } - - _subtype_map = { - 'instance_type': {'Kubernetes': 'KubernetesConnectionDetails'} - } - - def __init__(self, **kwargs): - super(OrchestratorSpecificConnectionDetails, self).__init__(**kwargs) - self.instance_type = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details_py3.py deleted file mode 100644 index c5a97af6956f..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/orchestrator_specific_connection_details_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 OrchestratorSpecificConnectionDetails(Model): - """Base class for types that supply values used to connect to container - orchestrators. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KubernetesConnectionDetails - - All required parameters must be populated in order to send to Azure. - - :param instance_type: Required. Constant filled by server. - :type instance_type: str - """ - - _validation = { - 'instance_type': {'required': True}, - } - - _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - } - - _subtype_map = { - 'instance_type': {'Kubernetes': 'KubernetesConnectionDetails'} - } - - def __init__(self, **kwargs) -> None: - super(OrchestratorSpecificConnectionDetails, self).__init__(**kwargs) - self.instance_type = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource.py deleted file mode 100644 index 89703dfa24af..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition.py deleted file mode 100644 index 2c1aead17da6..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 ResourceProviderOperationDefinition(Model): - """ResourceProviderOperationDefinition. - - :param name: Resource provider operation name. - :type name: str - :param display: - :type display: - ~azure.mgmt.devspaces.models.ResourceProviderOperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, - } - - def __init__(self, **kwargs): - super(ResourceProviderOperationDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_py3.py deleted file mode 100644 index f7cb35aa755d..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_definition_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 ResourceProviderOperationDefinition(Model): - """ResourceProviderOperationDefinition. - - :param name: Resource provider operation name. - :type name: str - :param display: - :type display: - ~azure.mgmt.devspaces.models.ResourceProviderOperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(ResourceProviderOperationDefinition, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display.py deleted file mode 100644 index abc031417cda..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 ResourceProviderOperationDisplay(Model): - """ResourceProviderOperationDisplay. - - :param provider: Name of the resource provider. - :type provider: str - :param resource: Name of the resource type. - :type resource: str - :param operation: Name of the resource provider operation. - :type operation: str - :param description: Description of the resource provider 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(ResourceProviderOperationDisplay, 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/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display_py3.py deleted file mode 100644 index a188e3b0c709..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_provider_operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 ResourceProviderOperationDisplay(Model): - """ResourceProviderOperationDisplay. - - :param provider: Name of the resource provider. - :type provider: str - :param resource: Name of the resource type. - :type resource: str - :param operation: Name of the resource provider operation. - :type operation: str - :param description: Description of the resource provider 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(ResourceProviderOperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_py3.py deleted file mode 100644 index 6ff792731c78..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku.py deleted file mode 100644 index 8757fdec65d6..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 Sku(Model): - """Model representing SKU for Azure Dev Spaces Controller. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the SKU for Azure Dev Spaces Controller. - Default value: "S1" . - :vartype name: str - :param tier: The tier of the SKU for Azure Dev Spaces Controller. Possible - values include: 'Standard' - :type tier: str or ~azure.mgmt.devspaces.models.SkuTier - """ - - _validation = { - 'name': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - name = "S1" - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.tier = kwargs.get('tier', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku_py3.py deleted file mode 100644 index 5bcc74ff0d20..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/sku_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 Sku(Model): - """Model representing SKU for Azure Dev Spaces Controller. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the SKU for Azure Dev Spaces Controller. - Default value: "S1" . - :vartype name: str - :param tier: The tier of the SKU for Azure Dev Spaces Controller. Possible - values include: 'Standard' - :type tier: str or ~azure.mgmt.devspaces.models.SkuTier - """ - - _validation = { - 'name': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - name = "S1" - - def __init__(self, *, tier=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.tier = tier diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource.py deleted file mode 100644 index f91385972d44..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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 .resource import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param tags: Tags for the Azure resource. - :type tags: dict[str, str] - :param location: Region where the Azure resource is located. - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource_py3.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource_py3.py deleted file mode 100644 index bd99b6755608..000000000000 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/tracked_resource_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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 .resource_py3 import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param tags: Tags for the Azure resource. - :type tags: dict[str, str] - :param location: Region where the Azure resource is located. - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, tags=None, location: str=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/__init__.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/__init__.py index 166c97cda17e..76db250732bb 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/__init__.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/__init__.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_host_mappings_operations import ContainerHostMappingsOperations -from .operations import Operations -from .controllers_operations import ControllersOperations +from ._container_host_mappings_operations import ContainerHostMappingsOperations +from ._operations import Operations +from ._controllers_operations import ControllersOperations __all__ = [ 'ContainerHostMappingsOperations', diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_container_host_mappings_operations.py similarity index 97% rename from sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py rename to sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_container_host_mappings_operations.py index be50d5c6b29b..ef43d849c3f4 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_container_host_mappings_operations.py @@ -18,6 +18,8 @@ class ContainerHostMappingsOperations(object): """ContainerHostMappingsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -97,7 +99,6 @@ def get_container_host_mapping( raise models.DevSpacesErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ContainerHostMapping', response) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_operations.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_controllers_operations.py similarity index 97% rename from sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_operations.py rename to sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_controllers_operations.py index bcd78880c41a..7c2a67a2a086 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_operations.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_controllers_operations.py @@ -20,6 +20,8 @@ class ControllersOperations(object): """ControllersOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -91,7 +93,6 @@ def get( raise models.DevSpacesErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Controller', response) @@ -353,7 +354,6 @@ def update( raise models.DevSpacesErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Controller', response) if response.status_code == 201: @@ -387,8 +387,7 @@ def list_by_resource_group( :raises: :class:`DevSpacesErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -418,6 +417,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -426,12 +430,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ControllerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ControllerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ControllerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers'} @@ -454,8 +456,7 @@ def list( :raises: :class:`DevSpacesErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -484,6 +485,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -492,12 +498,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ControllerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ControllerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ControllerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevSpaces/controllers'} @@ -566,7 +570,6 @@ def list_connection_details( raise models.DevSpacesErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ControllerConnectionDetailsList', response) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/operations.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_operations.py similarity index 90% rename from sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/operations.py rename to sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_operations.py index 5e3a4646b0f3..684a9397c0b5 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/operations.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,8 +57,7 @@ def list( ~azure.mgmt.devspaces.models.ResourceProviderOperationDefinitionPaged[~azure.mgmt.devspaces.models.ResourceProviderOperationDefinition] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -91,12 +97,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ResourceProviderOperationDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ResourceProviderOperationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ResourceProviderOperationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.DevSpaces/operations'}