Skip to content

Commit

Permalink
CodeGen from PR 13166 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Enable swagger ci for azure-powershell for some RPs (Azure#13166)
  • Loading branch information
SDKAuto committed Feb 26, 2021
1 parent 425f5ce commit 4ad674a
Show file tree
Hide file tree
Showing 12 changed files with 1,594 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sdk/azure-mgmt-windowsiot/azure/mgmt/windowsiot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 ._configuration import DeviceServicesConfiguration
from ._device_services import DeviceServices
__all__ = ['DeviceServices', 'DeviceServicesConfiguration']

from .version import VERSION

__version__ = VERSION

48 changes: 48 additions & 0 deletions sdk/azure-mgmt-windowsiot/azure/mgmt/windowsiot/_configuration.py
Original file line number Diff line number Diff line change
@@ -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 DeviceServicesConfiguration(AzureConfiguration):
"""Configuration for DeviceServices
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: The subscription identifier.
: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(DeviceServicesConfiguration, 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-windowsiot/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import DeviceServicesConfiguration
from .operations import Operations
from .operations import ServicesOperations
from . import models


class DeviceServices(SDKClient):
"""Use this API to manage the Windows IoT device services in your Azure subscription.
:ivar config: Configuration for client.
:vartype config: DeviceServicesConfiguration
:ivar operations: Operations operations
:vartype operations: azure.mgmt.windowsiot.operations.Operations
:ivar services: Services operations
:vartype services: azure.mgmt.windowsiot.operations.ServicesOperations
: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: The subscription identifier.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = DeviceServicesConfiguration(credentials, subscription_id, base_url)
super(DeviceServices, 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 = '2019-06-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.services = ServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
54 changes: 54 additions & 0 deletions sdk/azure-mgmt-windowsiot/azure/mgmt/windowsiot/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

try:
from ._models_py3 import DeviceService
from ._models_py3 import DeviceServiceCheckNameAvailabilityParameters
from ._models_py3 import DeviceServiceNameAvailabilityInfo
from ._models_py3 import ErrorDetails, ErrorDetailsException
from ._models_py3 import ErrorDetailsError
from ._models_py3 import OperationDisplayInfo
from ._models_py3 import OperationEntity
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import TrackedResource
except (SyntaxError, ImportError):
from ._models import DeviceService
from ._models import DeviceServiceCheckNameAvailabilityParameters
from ._models import DeviceServiceNameAvailabilityInfo
from ._models import ErrorDetails, ErrorDetailsException
from ._models import ErrorDetailsError
from ._models import OperationDisplayInfo
from ._models import OperationEntity
from ._models import ProxyResource
from ._models import Resource
from ._models import TrackedResource
from ._paged_models import DeviceServicePaged
from ._paged_models import OperationEntityPaged
from ._device_services_enums import (
ServiceNameUnavailabilityReason,
)

__all__ = [
'DeviceService',
'DeviceServiceCheckNameAvailabilityParameters',
'DeviceServiceNameAvailabilityInfo',
'ErrorDetails', 'ErrorDetailsException',
'ErrorDetailsError',
'OperationDisplayInfo',
'OperationEntity',
'ProxyResource',
'Resource',
'TrackedResource',
'OperationEntityPaged',
'DeviceServicePaged',
'ServiceNameUnavailabilityReason',
]
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 enum import Enum


class ServiceNameUnavailabilityReason(str, Enum):

invalid = "Invalid"
already_exists = "AlreadyExists"
Loading

0 comments on commit 4ad674a

Please sign in to comment.