-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 1247bce971f152f932cc9a92ea4f4d7f048be88e (#2921)
DevSpaces Python
- Loading branch information
1 parent
0a55fc3
commit 3d10d4f
Showing
36 changed files
with
2,095 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .dev_spaces_management_client import DevSpacesManagementClient | ||
from .version import VERSION | ||
|
||
__all__ = ['DevSpacesManagementClient'] | ||
|
||
__version__ = VERSION | ||
|
86 changes: 86 additions & 0 deletions
86
azure-mgmt-devspaces/azure/mgmt/devspaces/dev_spaces_management_client.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.service_client import SDKClient | ||
from msrest import Serializer, Deserializer | ||
from msrestazure import AzureConfiguration | ||
from .version import VERSION | ||
from .operations.controllers_operations import ControllersOperations | ||
from .operations.operations import Operations | ||
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<msrestazure.azure_active_directory>` | ||
: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 | ||
|
||
|
||
class DevSpacesManagementClient(SDKClient): | ||
"""Dev Spaces Client | ||
:ivar config: Configuration for client. | ||
:vartype config: DevSpacesManagementClientConfiguration | ||
:ivar controllers: Controllers operations | ||
:vartype controllers: azure.mgmt.devspaces.operations.ControllersOperations | ||
:ivar operations: Operations operations | ||
:vartype operations: azure.mgmt.devspaces.operations.Operations | ||
:param credentials: Credentials needed for the client to connect to Azure. | ||
:type credentials: :mod:`A msrestazure Credentials | ||
object<msrestazure.azure_active_directory>` | ||
: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): | ||
|
||
self.config = DevSpacesManagementClientConfiguration(credentials, subscription_id, base_url) | ||
super(DevSpacesManagementClient, self).__init__(self.config.credentials, self.config) | ||
|
||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
self.api_version = '2018-06-01-preview' | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
|
||
self.controllers = ControllersOperations( | ||
self._client, self.config, self._serialize, self._deserialize) | ||
self.operations = Operations( | ||
self._client, self.config, self._serialize, self._deserialize) |
65 changes: 65 additions & 0 deletions
65
azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
try: | ||
from .sku_py3 import Sku | ||
from .controller_py3 import Controller | ||
from .controller_update_parameters_py3 import ControllerUpdateParameters | ||
from .orchestrator_specific_connection_details_py3 import OrchestratorSpecificConnectionDetails | ||
from .controller_connection_details_py3 import ControllerConnectionDetails | ||
from .controller_connection_details_list_py3 import ControllerConnectionDetailsList | ||
from .tracked_resource_py3 import TrackedResource | ||
from .resource_provider_operation_display_py3 import ResourceProviderOperationDisplay | ||
from .resource_provider_operation_definition_py3 import ResourceProviderOperationDefinition | ||
from .resource_py3 import Resource | ||
from .kubernetes_connection_details_py3 import KubernetesConnectionDetails | ||
from .error_details_py3 import ErrorDetails | ||
from .error_response_py3 import ErrorResponse, ErrorResponseException | ||
except (SyntaxError, ImportError): | ||
from .sku import Sku | ||
from .controller import Controller | ||
from .controller_update_parameters import ControllerUpdateParameters | ||
from .orchestrator_specific_connection_details import OrchestratorSpecificConnectionDetails | ||
from .controller_connection_details import ControllerConnectionDetails | ||
from .controller_connection_details_list import ControllerConnectionDetailsList | ||
from .tracked_resource import TrackedResource | ||
from .resource_provider_operation_display import ResourceProviderOperationDisplay | ||
from .resource_provider_operation_definition import ResourceProviderOperationDefinition | ||
from .resource import Resource | ||
from .kubernetes_connection_details import KubernetesConnectionDetails | ||
from .error_details import ErrorDetails | ||
from .error_response import ErrorResponse, ErrorResponseException | ||
from .controller_paged import ControllerPaged | ||
from .resource_provider_operation_definition_paged import ResourceProviderOperationDefinitionPaged | ||
from .dev_spaces_management_client_enums import ( | ||
ProvisioningState, | ||
SkuTier, | ||
) | ||
|
||
__all__ = [ | ||
'Sku', | ||
'Controller', | ||
'ControllerUpdateParameters', | ||
'OrchestratorSpecificConnectionDetails', | ||
'ControllerConnectionDetails', | ||
'ControllerConnectionDetailsList', | ||
'TrackedResource', | ||
'ResourceProviderOperationDisplay', | ||
'ResourceProviderOperationDefinition', | ||
'Resource', | ||
'KubernetesConnectionDetails', | ||
'ErrorDetails', | ||
'ErrorResponse', 'ErrorResponseException', | ||
'ControllerPaged', | ||
'ResourceProviderOperationDefinitionPaged', | ||
'ProvisioningState', | ||
'SkuTier', | ||
] |
86 changes: 86 additions & 0 deletions
86
azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# 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' | ||
:vartype provisioning_state: str or | ||
~azure.mgmt.devspaces.models.ProvisioningState | ||
:param host_suffix: Required. DNS suffix for public endpoints running in | ||
the Azure Dev Spaces Controller. | ||
:type 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': {'required': 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 = kwargs.get('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) |
50 changes: 50 additions & 0 deletions
50
azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class ControllerConnectionDetails(Model): | ||
"""ControllerConnectionDetails. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
:ivar auth_key: Authentication key for communicating with services. | ||
:vartype auth_key: str | ||
:ivar workspace_storage_account_name: Workspace storage account name. | ||
:vartype workspace_storage_account_name: str | ||
:ivar workspace_storage_sas_token: Workspace storage account SAS token. | ||
:vartype workspace_storage_sas_token: str | ||
:param orchestrator_specific_connection_details: | ||
:type orchestrator_specific_connection_details: | ||
~azure.mgmt.devspaces.models.OrchestratorSpecificConnectionDetails | ||
""" | ||
|
||
_validation = { | ||
'auth_key': {'readonly': True}, | ||
'workspace_storage_account_name': {'readonly': True}, | ||
'workspace_storage_sas_token': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'auth_key': {'key': 'authKey', 'type': 'str'}, | ||
'workspace_storage_account_name': {'key': 'workspaceStorageAccountName', 'type': 'str'}, | ||
'workspace_storage_sas_token': {'key': 'workspaceStorageSasToken', 'type': 'str'}, | ||
'orchestrator_specific_connection_details': {'key': 'orchestratorSpecificConnectionDetails', 'type': 'OrchestratorSpecificConnectionDetails'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ControllerConnectionDetails, self).__init__(**kwargs) | ||
self.auth_key = None | ||
self.workspace_storage_account_name = None | ||
self.workspace_storage_sas_token = None | ||
self.orchestrator_specific_connection_details = kwargs.get('orchestrator_specific_connection_details', None) |
30 changes: 30 additions & 0 deletions
30
azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 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) |
30 changes: 30 additions & 0 deletions
30
azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_connection_details_list_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 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 |
Oops, something went wrong.