Skip to content

Commit 22e10e8

Browse files
authored
Generated from b1b2d42672f41da7deb0eda1938e589a9149dc2e (#6371)
add winiotsvcs stable api
1 parent 1dd0602 commit 22e10e8

File tree

12 files changed

+1630
-0
lines changed

12 files changed

+1630
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from ._configuration import DeviceServicesConfiguration
13+
from ._device_services import DeviceServices
14+
__all__ = ['DeviceServices', 'DeviceServicesConfiguration']
15+
16+
from .version import VERSION
17+
18+
__version__ = VERSION
19+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class DeviceServicesConfiguration(AzureConfiguration):
17+
"""Configuration for DeviceServices
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: The subscription identifier.
25+
:type subscription_id: str
26+
:param str base_url: Service URL
27+
"""
28+
29+
def __init__(
30+
self, credentials, subscription_id, base_url=None):
31+
32+
if credentials is None:
33+
raise ValueError("Parameter 'credentials' must not be None.")
34+
if subscription_id is None:
35+
raise ValueError("Parameter 'subscription_id' must not be None.")
36+
if not base_url:
37+
base_url = 'https://management.azure.com'
38+
39+
super(DeviceServicesConfiguration, self).__init__(base_url)
40+
41+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
42+
self.keep_alive = True
43+
44+
self.add_user_agent('azure-mgmt-windowsiot/{}'.format(VERSION))
45+
self.add_user_agent('Azure-SDK-For-Python')
46+
47+
self.credentials = credentials
48+
self.subscription_id = subscription_id
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
15+
from ._configuration import DeviceServicesConfiguration
16+
from .operations import Operations
17+
from .operations import ServicesOperations
18+
from . import models
19+
20+
21+
class DeviceServices(SDKClient):
22+
"""Use this API to manage the Windows IoT device services in your Azure subscription.
23+
24+
:ivar config: Configuration for client.
25+
:vartype config: DeviceServicesConfiguration
26+
27+
:ivar operations: Operations operations
28+
:vartype operations: azure.mgmt.windowsiot.operations.Operations
29+
:ivar services: Services operations
30+
:vartype services: azure.mgmt.windowsiot.operations.ServicesOperations
31+
32+
:param credentials: Credentials needed for the client to connect to Azure.
33+
:type credentials: :mod:`A msrestazure Credentials
34+
object<msrestazure.azure_active_directory>`
35+
:param subscription_id: The subscription identifier.
36+
:type subscription_id: str
37+
:param str base_url: Service URL
38+
"""
39+
40+
def __init__(
41+
self, credentials, subscription_id, base_url=None):
42+
43+
self.config = DeviceServicesConfiguration(credentials, subscription_id, base_url)
44+
super(DeviceServices, self).__init__(self.config.credentials, self.config)
45+
46+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
47+
self.api_version = '2019-06-01'
48+
self._serialize = Serializer(client_models)
49+
self._deserialize = Deserializer(client_models)
50+
51+
self.operations = Operations(
52+
self._client, self.config, self._serialize, self._deserialize)
53+
self.services = ServicesOperations(
54+
self._client, self.config, self._serialize, self._deserialize)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
try:
13+
from ._models_py3 import DeviceService
14+
from ._models_py3 import DeviceServiceCheckNameAvailabilityParameters
15+
from ._models_py3 import DeviceServiceNameAvailabilityInfo
16+
from ._models_py3 import DeviceServiceProperties
17+
from ._models_py3 import ErrorDetails, ErrorDetailsException
18+
from ._models_py3 import OperationDisplayInfo
19+
from ._models_py3 import OperationEntity
20+
from ._models_py3 import ProxyResource
21+
from ._models_py3 import Resource
22+
from ._models_py3 import TrackedResource
23+
except (SyntaxError, ImportError):
24+
from ._models import DeviceService
25+
from ._models import DeviceServiceCheckNameAvailabilityParameters
26+
from ._models import DeviceServiceNameAvailabilityInfo
27+
from ._models import DeviceServiceProperties
28+
from ._models import ErrorDetails, ErrorDetailsException
29+
from ._models import OperationDisplayInfo
30+
from ._models import OperationEntity
31+
from ._models import ProxyResource
32+
from ._models import Resource
33+
from ._models import TrackedResource
34+
from ._paged_models import DeviceServicePaged
35+
from ._paged_models import OperationEntityPaged
36+
from ._device_services_enums import (
37+
ServiceNameUnavailabilityReason,
38+
)
39+
40+
__all__ = [
41+
'DeviceService',
42+
'DeviceServiceCheckNameAvailabilityParameters',
43+
'DeviceServiceNameAvailabilityInfo',
44+
'DeviceServiceProperties',
45+
'ErrorDetails', 'ErrorDetailsException',
46+
'OperationDisplayInfo',
47+
'OperationEntity',
48+
'ProxyResource',
49+
'Resource',
50+
'TrackedResource',
51+
'OperationEntityPaged',
52+
'DeviceServicePaged',
53+
'ServiceNameUnavailabilityReason',
54+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from enum import Enum
13+
14+
15+
class ServiceNameUnavailabilityReason(str, Enum):
16+
17+
invalid = "Invalid"
18+
already_exists = "AlreadyExists"

0 commit comments

Comments
 (0)