|
| 1 | +# coding=utf-8 |
| 2 | +# -------------------------------------------------------------------------- |
| 3 | +# Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 | +# Licensed under the MIT License. See License.txt in the project root for license information. |
| 5 | +# Code generated by Microsoft (R) AutoRest Code Generator. |
| 6 | +# Changes may cause incorrect behavior and will be lost if the code is regenerated. |
| 7 | +# -------------------------------------------------------------------------- |
| 8 | + |
| 9 | +from typing import TYPE_CHECKING |
| 10 | + |
| 11 | +from azure.mgmt.core import ARMPipelineClient |
| 12 | +from msrest import Deserializer, Serializer |
| 13 | + |
| 14 | +if TYPE_CHECKING: |
| 15 | + # pylint: disable=unused-import,ungrouped-imports |
| 16 | + from typing import Any, Optional |
| 17 | + |
| 18 | + from azure.core.credentials import TokenCredential |
| 19 | + |
| 20 | +from ._configuration import ServiceFabricManagedClustersManagementClientConfiguration |
| 21 | +from .operations import ApplicationTypesOperations |
| 22 | +from .operations import ApplicationTypeVersionsOperations |
| 23 | +from .operations import ApplicationsOperations |
| 24 | +from .operations import ServicesOperations |
| 25 | +from .operations import ManagedClustersOperations |
| 26 | +from .operations import Operations |
| 27 | +from .operations import NodeTypesOperations |
| 28 | +from . import models |
| 29 | + |
| 30 | + |
| 31 | +class ServiceFabricManagedClustersManagementClient(object): |
| 32 | + """Service Fabric Managed Clusters Management Client. |
| 33 | +
|
| 34 | + :ivar application_types: ApplicationTypesOperations operations |
| 35 | + :vartype application_types: service_fabric_managed_clusters_management_client.operations.ApplicationTypesOperations |
| 36 | + :ivar application_type_versions: ApplicationTypeVersionsOperations operations |
| 37 | + :vartype application_type_versions: service_fabric_managed_clusters_management_client.operations.ApplicationTypeVersionsOperations |
| 38 | + :ivar applications: ApplicationsOperations operations |
| 39 | + :vartype applications: service_fabric_managed_clusters_management_client.operations.ApplicationsOperations |
| 40 | + :ivar services: ServicesOperations operations |
| 41 | + :vartype services: service_fabric_managed_clusters_management_client.operations.ServicesOperations |
| 42 | + :ivar managed_clusters: ManagedClustersOperations operations |
| 43 | + :vartype managed_clusters: service_fabric_managed_clusters_management_client.operations.ManagedClustersOperations |
| 44 | + :ivar operations: Operations operations |
| 45 | + :vartype operations: service_fabric_managed_clusters_management_client.operations.Operations |
| 46 | + :ivar node_types: NodeTypesOperations operations |
| 47 | + :vartype node_types: service_fabric_managed_clusters_management_client.operations.NodeTypesOperations |
| 48 | + :param credential: Credential needed for the client to connect to Azure. |
| 49 | + :type credential: ~azure.core.credentials.TokenCredential |
| 50 | + :param subscription_id: The customer subscription identifier. |
| 51 | + :type subscription_id: str |
| 52 | + :param str base_url: Service URL |
| 53 | + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. |
| 54 | + """ |
| 55 | + |
| 56 | + def __init__( |
| 57 | + self, |
| 58 | + credential, # type: "TokenCredential" |
| 59 | + subscription_id, # type: str |
| 60 | + base_url=None, # type: Optional[str] |
| 61 | + **kwargs # type: Any |
| 62 | + ): |
| 63 | + # type: (...) -> None |
| 64 | + if not base_url: |
| 65 | + base_url = 'https://management.azure.com' |
| 66 | + self._config = ServiceFabricManagedClustersManagementClientConfiguration(credential, subscription_id, **kwargs) |
| 67 | + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) |
| 68 | + |
| 69 | + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} |
| 70 | + self._serialize = Serializer(client_models) |
| 71 | + self._deserialize = Deserializer(client_models) |
| 72 | + |
| 73 | + self.application_types = ApplicationTypesOperations( |
| 74 | + self._client, self._config, self._serialize, self._deserialize) |
| 75 | + self.application_type_versions = ApplicationTypeVersionsOperations( |
| 76 | + self._client, self._config, self._serialize, self._deserialize) |
| 77 | + self.applications = ApplicationsOperations( |
| 78 | + self._client, self._config, self._serialize, self._deserialize) |
| 79 | + self.services = ServicesOperations( |
| 80 | + self._client, self._config, self._serialize, self._deserialize) |
| 81 | + self.managed_clusters = ManagedClustersOperations( |
| 82 | + self._client, self._config, self._serialize, self._deserialize) |
| 83 | + self.operations = Operations( |
| 84 | + self._client, self._config, self._serialize, self._deserialize) |
| 85 | + self.node_types = NodeTypesOperations( |
| 86 | + self._client, self._config, self._serialize, self._deserialize) |
| 87 | + |
| 88 | + def close(self): |
| 89 | + # type: () -> None |
| 90 | + self._client.close() |
| 91 | + |
| 92 | + def __enter__(self): |
| 93 | + # type: () -> ServiceFabricManagedClustersManagementClient |
| 94 | + self._client.__enter__() |
| 95 | + return self |
| 96 | + |
| 97 | + def __exit__(self, *exc_details): |
| 98 | + # type: (Any) -> None |
| 99 | + self._client.__exit__(*exc_details) |
0 commit comments