From e75bf0ef04cea9aadef49794d8aa69a6005a5f24 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 4 Jun 2019 10:38:32 -0700 Subject: [PATCH] Generated from c25c912263cca2d8bb82d83b6f50eaac161f9b80 (#5676) chore: jsonfmt engagementfabric Ran `jsonfmt -w "specification/engagementfabric/**/*.json"` --- .../azure/mgmt/engagementfabric/__init__.py | 18 + .../engagementfabric/engagement_fabric.py | 170 +++++ .../mgmt/engagementfabric/models/__init__.py | 83 +++ .../mgmt/engagementfabric/models/account.py | 55 ++ .../engagementfabric/models/account_paged.py | 27 + .../engagementfabric/models/account_patch.py | 28 + .../models/account_patch_py3.py | 28 + .../engagementfabric/models/account_py3.py | 55 ++ .../mgmt/engagementfabric/models/channel.py | 57 ++ .../engagementfabric/models/channel_paged.py | 27 + .../engagementfabric/models/channel_py3.py | 57 ++ .../models/channel_type_description.py | 36 + .../models/channel_type_description_list.py | 29 + .../channel_type_description_list_py3.py | 29 + .../models/channel_type_description_py3.py | 36 + .../check_name_availability_parameter.py | 40 ++ .../check_name_availability_parameter_py3.py | 40 ++ .../models/check_name_availability_result.py | 47 ++ .../check_name_availability_result_py3.py | 47 ++ .../models/engagement_fabric_enums.py | 24 + .../models/key_description.py | 46 ++ .../models/key_description_paged.py | 27 + .../models/key_description_py3.py | 46 ++ .../mgmt/engagementfabric/models/operation.py | 40 ++ .../models/operation_display.py | 51 ++ .../models/operation_display_py3.py | 51 ++ .../models/operation_paged.py | 27 + .../engagementfabric/models/operation_py3.py | 40 ++ .../models/proxy_only_resource.py | 42 ++ .../models/proxy_only_resource_py3.py | 42 ++ .../models/regenerate_key_parameter.py | 40 ++ .../models/regenerate_key_parameter_py3.py | 40 ++ .../mgmt/engagementfabric/models/resource.py | 45 ++ .../engagementfabric/models/resource_py3.py | 45 ++ .../azure/mgmt/engagementfabric/models/sku.py | 38 ++ .../models/sku_description.py | 61 ++ .../models/sku_description_paged.py | 27 + .../models/sku_description_py3.py | 61 ++ .../models/sku_location_info_item.py | 32 + .../models/sku_location_info_item_py3.py | 32 + .../mgmt/engagementfabric/models/sku_py3.py | 38 ++ .../models/tracked_resource.py | 58 ++ .../models/tracked_resource_py3.py | 58 ++ .../engagementfabric/operations/__init__.py | 22 + .../operations/accounts_operations.py | 627 ++++++++++++++++++ .../operations/channels_operations.py | 300 +++++++++ .../engagementfabric/operations/operations.py | 98 +++ .../operations/sk_us_operations.py | 102 +++ .../azure/mgmt/engagementfabric/version.py | 13 + 49 files changed, 3082 insertions(+) create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/__init__.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/engagement_fabric.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/__init__.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_paged.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_patch.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_patch_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_paged.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_list.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_list_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_parameter.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_parameter_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_result.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_result_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/engagement_fabric_enums.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description_paged.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_display.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_display_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_paged.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/proxy_only_resource.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/proxy_only_resource_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/regenerate_key_parameter.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/regenerate_key_parameter_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/resource.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/resource_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description_paged.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_location_info_item.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_location_info_item_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/tracked_resource.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/tracked_resource_py3.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/__init__.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/accounts_operations.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/channels_operations.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/operations.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/sk_us_operations.py create mode 100644 sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/version.py diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/__init__.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/__init__.py new file mode 100644 index 000000000000..52fbf7ab9c29 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/__init__.py @@ -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 .engagement_fabric import EngagementFabric +from .version import VERSION + +__all__ = ['EngagementFabric'] + +__version__ = VERSION + diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/engagement_fabric.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/engagement_fabric.py new file mode 100644 index 000000000000..547dac95c733 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/engagement_fabric.py @@ -0,0 +1,170 @@ +# 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 msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +import uuid +from .operations.accounts_operations import AccountsOperations +from .operations.channels_operations import ChannelsOperations +from .operations.operations import Operations +from .operations.sk_us_operations import SKUsOperations +from . import models + + +class EngagementFabricConfiguration(AzureConfiguration): + """Configuration for EngagementFabric + 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: 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(EngagementFabricConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-engagementfabric/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class EngagementFabric(SDKClient): + """Microsoft Customer Engagement Fabric + + :ivar config: Configuration for client. + :vartype config: EngagementFabricConfiguration + + :ivar accounts: Accounts operations + :vartype accounts: azure.mgmt.engagementfabric.operations.AccountsOperations + :ivar channels: Channels operations + :vartype channels: azure.mgmt.engagementfabric.operations.ChannelsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.engagementfabric.operations.Operations + :ivar sk_us: SKUs operations + :vartype sk_us: azure.mgmt.engagementfabric.operations.SKUsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription ID + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = EngagementFabricConfiguration(credentials, subscription_id, base_url) + super(EngagementFabric, 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-09-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.accounts = AccountsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.channels = ChannelsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.sk_us = SKUsOperations( + self._client, self.config, self._serialize, self._deserialize) + + def check_name_availability( + self, resource_group_name, name, type, custom_headers=None, raw=False, **operation_config): + """Check availability of EngagementFabric resource. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param name: The name to be checked + :type name: str + :param type: The fully qualified resource type for the name to be + checked + :type type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.engagementfabric.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.CheckNameAvailabilityParameter(name=name, type=type) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameter') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/checkNameAvailability'} diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/__init__.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/__init__.py new file mode 100644 index 000000000000..530f3de3f9cc --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/__init__.py @@ -0,0 +1,83 @@ +# 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 .resource_py3 import Resource + from .tracked_resource_py3 import TrackedResource + from .account_py3 import Account + from .account_patch_py3 import AccountPatch + from .key_description_py3 import KeyDescription + from .regenerate_key_parameter_py3 import RegenerateKeyParameter + from .channel_type_description_py3 import ChannelTypeDescription + from .channel_type_description_list_py3 import ChannelTypeDescriptionList + from .proxy_only_resource_py3 import ProxyOnlyResource + from .channel_py3 import Channel + from .check_name_availability_parameter_py3 import CheckNameAvailabilityParameter + from .check_name_availability_result_py3 import CheckNameAvailabilityResult + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .sku_location_info_item_py3 import SkuLocationInfoItem + from .sku_description_py3 import SkuDescription +except (SyntaxError, ImportError): + from .sku import SKU + from .resource import Resource + from .tracked_resource import TrackedResource + from .account import Account + from .account_patch import AccountPatch + from .key_description import KeyDescription + from .regenerate_key_parameter import RegenerateKeyParameter + from .channel_type_description import ChannelTypeDescription + from .channel_type_description_list import ChannelTypeDescriptionList + from .proxy_only_resource import ProxyOnlyResource + from .channel import Channel + from .check_name_availability_parameter import CheckNameAvailabilityParameter + from .check_name_availability_result import CheckNameAvailabilityResult + from .operation_display import OperationDisplay + from .operation import Operation + from .sku_location_info_item import SkuLocationInfoItem + from .sku_description import SkuDescription +from .account_paged import AccountPaged +from .key_description_paged import KeyDescriptionPaged +from .channel_paged import ChannelPaged +from .operation_paged import OperationPaged +from .sku_description_paged import SkuDescriptionPaged +from .engagement_fabric_enums import ( + KeyRank, + CheckNameUnavailableReason, +) + +__all__ = [ + 'SKU', + 'Resource', + 'TrackedResource', + 'Account', + 'AccountPatch', + 'KeyDescription', + 'RegenerateKeyParameter', + 'ChannelTypeDescription', + 'ChannelTypeDescriptionList', + 'ProxyOnlyResource', + 'Channel', + 'CheckNameAvailabilityParameter', + 'CheckNameAvailabilityResult', + 'OperationDisplay', + 'Operation', + 'SkuLocationInfoItem', + 'SkuDescription', + 'AccountPaged', + 'KeyDescriptionPaged', + 'ChannelPaged', + 'OperationPaged', + 'SkuDescriptionPaged', + 'KeyRank', + 'CheckNameUnavailableReason', +] diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account.py new file mode 100644 index 000000000000..39d727f1c9dc --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account.py @@ -0,0 +1,55 @@ +# 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 Account(TrackedResource): + """The EngagementFabric account. + + 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: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified type of the resource + :vartype type: str + :param location: Required. The location of the resource + :type location: str + :param tags: The tags of the resource + :type tags: dict[str, str] + :param sku: Required. The SKU of the resource + :type sku: ~azure.mgmt.engagementfabric.models.SKU + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SKU'}, + } + + def __init__(self, **kwargs): + super(Account, self).__init__(**kwargs) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_paged.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_paged.py new file mode 100644 index 000000000000..4190321c3845 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_paged.py @@ -0,0 +1,27 @@ +# 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 AccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`Account ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Account]'} + } + + def __init__(self, *args, **kwargs): + + super(AccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_patch.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_patch.py new file mode 100644 index 000000000000..8f29c0c465f9 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_patch.py @@ -0,0 +1,28 @@ +# 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 AccountPatch(Model): + """The patch of EngagementFabric account. + + :param tags: The tags of the resource + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(AccountPatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_patch_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_patch_py3.py new file mode 100644 index 000000000000..1b7a8cca2ecc --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_patch_py3.py @@ -0,0 +1,28 @@ +# 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 AccountPatch(Model): + """The patch of EngagementFabric account. + + :param tags: The tags of the resource + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(AccountPatch, self).__init__(**kwargs) + self.tags = tags diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_py3.py new file mode 100644 index 000000000000..e8365f7568cb --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/account_py3.py @@ -0,0 +1,55 @@ +# 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 Account(TrackedResource): + """The EngagementFabric account. + + 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: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified type of the resource + :vartype type: str + :param location: Required. The location of the resource + :type location: str + :param tags: The tags of the resource + :type tags: dict[str, str] + :param sku: Required. The SKU of the resource + :type sku: ~azure.mgmt.engagementfabric.models.SKU + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SKU'}, + } + + def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: + super(Account, self).__init__(location=location, tags=tags, sku=sku, **kwargs) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel.py new file mode 100644 index 000000000000..cb53339db0eb --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel.py @@ -0,0 +1,57 @@ +# 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 .proxy_only_resource import ProxyOnlyResource + + +class Channel(ProxyOnlyResource): + """The EngagementFabric channel. + + 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: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified type of the resource + :vartype type: str + :param channel_type: Required. The channel type + :type channel_type: str + :param channel_functions: The functions to be enabled for the channel + :type channel_functions: list[str] + :param credentials: The channel credentials + :type credentials: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'channel_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'channel_type': {'key': 'properties.channelType', 'type': 'str'}, + 'channel_functions': {'key': 'properties.channelFunctions', 'type': '[str]'}, + 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Channel, self).__init__(**kwargs) + self.channel_type = kwargs.get('channel_type', None) + self.channel_functions = kwargs.get('channel_functions', None) + self.credentials = kwargs.get('credentials', None) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_paged.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_paged.py new file mode 100644 index 000000000000..84a5dc8da87f --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_paged.py @@ -0,0 +1,27 @@ +# 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 ChannelPaged(Paged): + """ + A paging container for iterating over a list of :class:`Channel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Channel]'} + } + + def __init__(self, *args, **kwargs): + + super(ChannelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_py3.py new file mode 100644 index 000000000000..2c0b080b55eb --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_py3.py @@ -0,0 +1,57 @@ +# 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 .proxy_only_resource_py3 import ProxyOnlyResource + + +class Channel(ProxyOnlyResource): + """The EngagementFabric channel. + + 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: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified type of the resource + :vartype type: str + :param channel_type: Required. The channel type + :type channel_type: str + :param channel_functions: The functions to be enabled for the channel + :type channel_functions: list[str] + :param credentials: The channel credentials + :type credentials: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'channel_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'channel_type': {'key': 'properties.channelType', 'type': 'str'}, + 'channel_functions': {'key': 'properties.channelFunctions', 'type': '[str]'}, + 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, + } + + def __init__(self, *, channel_type: str, channel_functions=None, credentials=None, **kwargs) -> None: + super(Channel, self).__init__(**kwargs) + self.channel_type = channel_type + self.channel_functions = channel_functions + self.credentials = credentials diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description.py new file mode 100644 index 000000000000..a993a146194e --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description.py @@ -0,0 +1,36 @@ +# 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 ChannelTypeDescription(Model): + """EngagementFabric channel description. + + :param channel_type: Channel type + :type channel_type: str + :param channel_description: Text description for the channel + :type channel_description: str + :param channel_functions: All the available functions for the channel + :type channel_functions: list[str] + """ + + _attribute_map = { + 'channel_type': {'key': 'channelType', 'type': 'str'}, + 'channel_description': {'key': 'channelDescription', 'type': 'str'}, + 'channel_functions': {'key': 'channelFunctions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ChannelTypeDescription, self).__init__(**kwargs) + self.channel_type = kwargs.get('channel_type', None) + self.channel_description = kwargs.get('channel_description', None) + self.channel_functions = kwargs.get('channel_functions', None) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_list.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_list.py new file mode 100644 index 000000000000..a10209818ac5 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_list.py @@ -0,0 +1,29 @@ +# 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 ChannelTypeDescriptionList(Model): + """List of the EngagementFabric channel descriptions. + + :param value: Channel descriptions + :type value: + list[~azure.mgmt.engagementfabric.models.ChannelTypeDescription] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChannelTypeDescription]'}, + } + + def __init__(self, **kwargs): + super(ChannelTypeDescriptionList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_list_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_list_py3.py new file mode 100644 index 000000000000..cb17762cb735 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_list_py3.py @@ -0,0 +1,29 @@ +# 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 ChannelTypeDescriptionList(Model): + """List of the EngagementFabric channel descriptions. + + :param value: Channel descriptions + :type value: + list[~azure.mgmt.engagementfabric.models.ChannelTypeDescription] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChannelTypeDescription]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ChannelTypeDescriptionList, self).__init__(**kwargs) + self.value = value diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_py3.py new file mode 100644 index 000000000000..f38706598359 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/channel_type_description_py3.py @@ -0,0 +1,36 @@ +# 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 ChannelTypeDescription(Model): + """EngagementFabric channel description. + + :param channel_type: Channel type + :type channel_type: str + :param channel_description: Text description for the channel + :type channel_description: str + :param channel_functions: All the available functions for the channel + :type channel_functions: list[str] + """ + + _attribute_map = { + 'channel_type': {'key': 'channelType', 'type': 'str'}, + 'channel_description': {'key': 'channelDescription', 'type': 'str'}, + 'channel_functions': {'key': 'channelFunctions', 'type': '[str]'}, + } + + def __init__(self, *, channel_type: str=None, channel_description: str=None, channel_functions=None, **kwargs) -> None: + super(ChannelTypeDescription, self).__init__(**kwargs) + self.channel_type = channel_type + self.channel_description = channel_description + self.channel_functions = channel_functions diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_parameter.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_parameter.py new file mode 100644 index 000000000000..c02c9291a41d --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_parameter.py @@ -0,0 +1,40 @@ +# 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 CheckNameAvailabilityParameter(Model): + """The parameter for name availability check. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to be checked + :type name: str + :param type: Required. The fully qualified resource type for the name to + be checked + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_parameter_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_parameter_py3.py new file mode 100644 index 000000000000..f9fad39d93d9 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_parameter_py3.py @@ -0,0 +1,40 @@ +# 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 CheckNameAvailabilityParameter(Model): + """The parameter for name availability check. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to be checked + :type name: str + :param type: Required. The fully qualified resource type for the name to + be checked + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str, type: str, **kwargs) -> None: + super(CheckNameAvailabilityParameter, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_result.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_result.py new file mode 100644 index 000000000000..759b6f9e291d --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_result.py @@ -0,0 +1,47 @@ +# 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 CheckNameAvailabilityResult(Model): + """The result of name availability check. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The name to be checked + :vartype name_available: bool + :ivar reason: The reason if name is unavailable. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.engagementfabric.models.CheckNameUnavailableReason + :ivar message: The message if name is unavailable + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_result_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_result_py3.py new file mode 100644 index 000000000000..302820cd02d6 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/check_name_availability_result_py3.py @@ -0,0 +1,47 @@ +# 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 CheckNameAvailabilityResult(Model): + """The result of name availability check. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The name to be checked + :vartype name_available: bool + :ivar reason: The reason if name is unavailable. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.engagementfabric.models.CheckNameUnavailableReason + :ivar message: The message if name is unavailable + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/engagement_fabric_enums.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/engagement_fabric_enums.py new file mode 100644 index 000000000000..ae374aee9bcb --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/engagement_fabric_enums.py @@ -0,0 +1,24 @@ +# 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 KeyRank(str, Enum): + + primary_key = "PrimaryKey" + secondary_key = "SecondaryKey" + + +class CheckNameUnavailableReason(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description.py new file mode 100644 index 000000000000..b7fc0fcff6d1 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description.py @@ -0,0 +1,46 @@ +# 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 KeyDescription(Model): + """The description of the EngagementFabric account key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the key + :vartype name: str + :ivar rank: The rank of the key. Possible values include: 'PrimaryKey', + 'SecondaryKey' + :vartype rank: str or ~azure.mgmt.engagementfabric.models.KeyRank + :ivar value: The value of the key + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'rank': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'rank': {'key': 'rank', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyDescription, self).__init__(**kwargs) + self.name = None + self.rank = None + self.value = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description_paged.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description_paged.py new file mode 100644 index 000000000000..66a86206bafd --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description_paged.py @@ -0,0 +1,27 @@ +# 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 KeyDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`KeyDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[KeyDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(KeyDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description_py3.py new file mode 100644 index 000000000000..cad1d00b9e9c --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/key_description_py3.py @@ -0,0 +1,46 @@ +# 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 KeyDescription(Model): + """The description of the EngagementFabric account key. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the key + :vartype name: str + :ivar rank: The rank of the key. Possible values include: 'PrimaryKey', + 'SecondaryKey' + :vartype rank: str or ~azure.mgmt.engagementfabric.models.KeyRank + :ivar value: The value of the key + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'rank': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'rank': {'key': 'rank', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyDescription, self).__init__(**kwargs) + self.name = None + self.rank = None + self.value = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation.py new file mode 100644 index 000000000000..b9cc82914cb7 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation.py @@ -0,0 +1,40 @@ +# 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 Operation(Model): + """The EngagementFabric operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the EngagementFabric operation + :vartype name: str + :ivar display: The display content of the EngagementFabric operation + :vartype display: ~azure.mgmt.engagementfabric.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_display.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_display.py new file mode 100644 index 000000000000..5395d0c5e39f --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_display.py @@ -0,0 +1,51 @@ +# 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 OperationDisplay(Model): + """The display information of the EngagementFabric operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider namespace of the EngagementFabric + operation + :vartype provider: str + :ivar resource: The resource type of the EngagementFabric operation + :vartype resource: str + :ivar operation: The name of the EngagementFabric operation + :vartype operation: str + :ivar description: The description of the EngagementFabric operation + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _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(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_display_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_display_py3.py new file mode 100644 index 000000000000..44ecfcbc8c8d --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_display_py3.py @@ -0,0 +1,51 @@ +# 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 OperationDisplay(Model): + """The display information of the EngagementFabric operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider namespace of the EngagementFabric + operation + :vartype provider: str + :ivar resource: The resource type of the EngagementFabric operation + :vartype resource: str + :ivar operation: The name of the EngagementFabric operation + :vartype operation: str + :ivar description: The description of the EngagementFabric operation + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _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) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_paged.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_paged.py new file mode 100644 index 000000000000..21a1387cccb1 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_paged.py @@ -0,0 +1,27 @@ +# 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 OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_py3.py new file mode 100644 index 000000000000..506a511669dd --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/operation_py3.py @@ -0,0 +1,40 @@ +# 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 Operation(Model): + """The EngagementFabric operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the EngagementFabric operation + :vartype name: str + :ivar display: The display content of the EngagementFabric operation + :vartype display: ~azure.mgmt.engagementfabric.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/proxy_only_resource.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/proxy_only_resource.py new file mode 100644 index 000000000000..3efa7bdbe04d --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/proxy_only_resource.py @@ -0,0 +1,42 @@ +# 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 ProxyOnlyResource(Resource): + """The base model for the proxy-only Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified 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(ProxyOnlyResource, self).__init__(**kwargs) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/proxy_only_resource_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/proxy_only_resource_py3.py new file mode 100644 index 000000000000..df3c7bccdaf7 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/proxy_only_resource_py3.py @@ -0,0 +1,42 @@ +# 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 ProxyOnlyResource(Resource): + """The base model for the proxy-only Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified 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(ProxyOnlyResource, self).__init__(**kwargs) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/regenerate_key_parameter.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/regenerate_key_parameter.py new file mode 100644 index 000000000000..8a253b7cd5ad --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/regenerate_key_parameter.py @@ -0,0 +1,40 @@ +# 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 RegenerateKeyParameter(Model): + """The parameter to regenerate single EngagementFabric account key. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of key to be regenerated + :type name: str + :param rank: Required. The rank of the key to be regenerated. Possible + values include: 'PrimaryKey', 'SecondaryKey' + :type rank: str or ~azure.mgmt.engagementfabric.models.KeyRank + """ + + _validation = { + 'name': {'required': True}, + 'rank': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'rank': {'key': 'rank', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegenerateKeyParameter, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.rank = kwargs.get('rank', None) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/regenerate_key_parameter_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/regenerate_key_parameter_py3.py new file mode 100644 index 000000000000..b255b31387a8 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/regenerate_key_parameter_py3.py @@ -0,0 +1,40 @@ +# 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 RegenerateKeyParameter(Model): + """The parameter to regenerate single EngagementFabric account key. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of key to be regenerated + :type name: str + :param rank: Required. The rank of the key to be regenerated. Possible + values include: 'PrimaryKey', 'SecondaryKey' + :type rank: str or ~azure.mgmt.engagementfabric.models.KeyRank + """ + + _validation = { + 'name': {'required': True}, + 'rank': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'rank': {'key': 'rank', 'type': 'str'}, + } + + def __init__(self, *, name: str, rank, **kwargs) -> None: + super(RegenerateKeyParameter, self).__init__(**kwargs) + self.name = name + self.rank = rank diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/resource.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/resource.py new file mode 100644 index 000000000000..bc9697e0d50f --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/resource.py @@ -0,0 +1,45 @@ +# 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): + """The base model for Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified 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/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/resource_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/resource_py3.py new file mode 100644 index 000000000000..ff73043f4883 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/resource_py3.py @@ -0,0 +1,45 @@ +# 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): + """The base model for Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified 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/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku.py new file mode 100644 index 000000000000..ae0d0d29fcf2 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku.py @@ -0,0 +1,38 @@ +# 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): + """The EngagementFabric SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU + :type name: str + :param tier: The price tier of the SKU + :type tier: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SKU, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description.py new file mode 100644 index 000000000000..85e8102d1f1c --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description.py @@ -0,0 +1,61 @@ +# 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 SkuDescription(Model): + """The EngagementFabric SKU description of given resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The fully qualified resource type + :vartype resource_type: str + :ivar name: The name of the SKU + :vartype name: str + :ivar tier: The price tier of the SKU + :vartype tier: str + :ivar locations: The set of locations that the SKU is available + :vartype locations: list[str] + :ivar location_info: Locations and zones + :vartype location_info: + list[~azure.mgmt.engagementfabric.models.SkuLocationInfoItem] + :ivar restrictions: The restrictions because of which SKU cannot be used + :vartype restrictions: list[object] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfoItem]'}, + 'restrictions': {'key': 'restrictions', 'type': '[object]'}, + } + + def __init__(self, **kwargs): + super(SkuDescription, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.locations = None + self.location_info = None + self.restrictions = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description_paged.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description_paged.py new file mode 100644 index 000000000000..28f0f53d66b5 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description_paged.py @@ -0,0 +1,27 @@ +# 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 SkuDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`SkuDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SkuDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description_py3.py new file mode 100644 index 000000000000..bccfa26b3782 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_description_py3.py @@ -0,0 +1,61 @@ +# 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 SkuDescription(Model): + """The EngagementFabric SKU description of given resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The fully qualified resource type + :vartype resource_type: str + :ivar name: The name of the SKU + :vartype name: str + :ivar tier: The price tier of the SKU + :vartype tier: str + :ivar locations: The set of locations that the SKU is available + :vartype locations: list[str] + :ivar location_info: Locations and zones + :vartype location_info: + list[~azure.mgmt.engagementfabric.models.SkuLocationInfoItem] + :ivar restrictions: The restrictions because of which SKU cannot be used + :vartype restrictions: list[object] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfoItem]'}, + 'restrictions': {'key': 'restrictions', 'type': '[object]'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuDescription, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.locations = None + self.location_info = None + self.restrictions = None diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_location_info_item.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_location_info_item.py new file mode 100644 index 000000000000..02f6e06af4b9 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_location_info_item.py @@ -0,0 +1,32 @@ +# 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 SkuLocationInfoItem(Model): + """The Locations and zones info for SKU. + + :param location: The available location of the SKU + :type location: str + :param zones: The available zone of the SKU + :type zones: list[str] + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SkuLocationInfoItem, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.zones = kwargs.get('zones', None) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_location_info_item_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_location_info_item_py3.py new file mode 100644 index 000000000000..6174aaf71016 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_location_info_item_py3.py @@ -0,0 +1,32 @@ +# 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 SkuLocationInfoItem(Model): + """The Locations and zones info for SKU. + + :param location: The available location of the SKU + :type location: str + :param zones: The available zone of the SKU + :type zones: list[str] + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str=None, zones=None, **kwargs) -> None: + super(SkuLocationInfoItem, self).__init__(**kwargs) + self.location = location + self.zones = zones diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_py3.py new file mode 100644 index 000000000000..4bda868ef5cb --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/sku_py3.py @@ -0,0 +1,38 @@ +# 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): + """The EngagementFabric SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU + :type name: str + :param tier: The price tier of the SKU + :type tier: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name: str, tier: str=None, **kwargs) -> None: + super(SKU, self).__init__(**kwargs) + self.name = name + self.tier = tier diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/tracked_resource.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/tracked_resource.py new file mode 100644 index 000000000000..4c373815fc8a --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/tracked_resource.py @@ -0,0 +1,58 @@ +# 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 base model for the tracked Azure resource. + + 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: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified type of the resource + :vartype type: str + :param location: Required. The location of the resource + :type location: str + :param tags: The tags of the resource + :type tags: dict[str, str] + :param sku: Required. The SKU of the resource + :type sku: ~azure.mgmt.engagementfabric.models.SKU + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SKU'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/tracked_resource_py3.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/tracked_resource_py3.py new file mode 100644 index 000000000000..e7fc79765fda --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/models/tracked_resource_py3.py @@ -0,0 +1,58 @@ +# 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 base model for the tracked Azure resource. + + 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: The ID of the resource + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The fully qualified type of the resource + :vartype type: str + :param location: Required. The location of the resource + :type location: str + :param tags: The tags of the resource + :type tags: dict[str, str] + :param sku: Required. The SKU of the resource + :type sku: ~azure.mgmt.engagementfabric.models.SKU + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SKU'}, + } + + def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.sku = sku diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/__init__.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/__init__.py new file mode 100644 index 000000000000..6d3af58f426d --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/__init__.py @@ -0,0 +1,22 @@ +# 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 .accounts_operations import AccountsOperations +from .channels_operations import ChannelsOperations +from .operations import Operations +from .sk_us_operations import SKUsOperations + +__all__ = [ + 'AccountsOperations', + 'ChannelsOperations', + 'Operations', + 'SKUsOperations', +] diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/accounts_operations.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/accounts_operations.py new file mode 100644 index 000000000000..9e52c99e6618 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/accounts_operations.py @@ -0,0 +1,627 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AccountsOperations(object): + """AccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Get the EngagementFabric account. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Account or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.engagementfabric.models.Account or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Account', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}'} + + def create_or_update( + self, resource_group_name, account_name, account, custom_headers=None, raw=False, **operation_config): + """Create or Update the EngagementFabric account. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param account: The EngagementFabric account description + :type account: ~azure.mgmt.engagementfabric.models.Account + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Account or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.engagementfabric.models.Account or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(account, 'Account') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Account', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}'} + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Delete the EngagementFabric account. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}'} + + def update( + self, resource_group_name, account_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Update EngagementFabric account. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param tags: The tags of the resource + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Account or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.engagementfabric.models.Account or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + account_patch = models.AccountPatch(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(account_patch, 'AccountPatch') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Account', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List the EngagementFabric accounts in given subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Account + :rtype: + ~azure.mgmt.engagementfabric.models.AccountPaged[~azure.mgmt.engagementfabric.models.Account] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.AccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EngagementFabric/Accounts'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List EngagementFabric accounts in given resource group. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Account + :rtype: + ~azure.mgmt.engagementfabric.models.AccountPaged[~azure.mgmt.engagementfabric.models.Account] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.AccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts'} + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """List keys of the EngagementFabric account. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of KeyDescription + :rtype: + ~azure.mgmt.engagementfabric.models.KeyDescriptionPaged[~azure.mgmt.engagementfabric.models.KeyDescription] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.KeyDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.KeyDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}/listKeys'} + + def regenerate_key( + self, resource_group_name, account_name, name, rank, custom_headers=None, raw=False, **operation_config): + """Regenerate key of the EngagementFabric account. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param name: The name of key to be regenerated + :type name: str + :param rank: The rank of the key to be regenerated. Possible values + include: 'PrimaryKey', 'SecondaryKey' + :type rank: str or ~azure.mgmt.engagementfabric.models.KeyRank + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KeyDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.engagementfabric.models.KeyDescription or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameter = models.RegenerateKeyParameter(name=name, rank=rank) + + # Construct URL + url = self.regenerate_key.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameter, 'RegenerateKeyParameter') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('KeyDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}/regenerateKey'} + + def list_channel_types( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """List available EngagementFabric channel types and functions. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ChannelTypeDescriptionList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.engagementfabric.models.ChannelTypeDescriptionList + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_channel_types.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ChannelTypeDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_channel_types.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}/listChannelTypes'} diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/channels_operations.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/channels_operations.py new file mode 100644 index 000000000000..20bc6d1de5c8 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/channels_operations.py @@ -0,0 +1,300 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ChannelsOperations(object): + """ChannelsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def get( + self, resource_group_name, account_name, channel_name, custom_headers=None, raw=False, **operation_config): + """Get the EngagementFabric channel. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param channel_name: Channel Name + :type channel_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Channel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.engagementfabric.models.Channel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'channelName': self._serialize.url("channel_name", channel_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Channel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}/Channels/{channelName}'} + + def create_or_update( + self, resource_group_name, account_name, channel_name, channel, custom_headers=None, raw=False, **operation_config): + """Create or Update the EngagementFabric channel. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param channel_name: Channel Name + :type channel_name: str + :param channel: The EngagementFabric channel description + :type channel: ~azure.mgmt.engagementfabric.models.Channel + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Channel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.engagementfabric.models.Channel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'channelName': self._serialize.url("channel_name", channel_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(channel, 'Channel') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Channel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}/Channels/{channelName}'} + + def delete( + self, resource_group_name, account_name, channel_name, custom_headers=None, raw=False, **operation_config): + """Delete the EngagementFabric channel. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param channel_name: The EngagementFabric channel name + :type channel_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'channelName': self._serialize.url("channel_name", channel_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}/Channels/{channelName}'} + + def list_by_account( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """List the EngagementFabric channels. + + :param resource_group_name: Resource Group Name + :type resource_group_name: str + :param account_name: Account Name + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Channel + :rtype: + ~azure.mgmt.engagementfabric.models.ChannelPaged[~azure.mgmt.engagementfabric.models.Channel] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ChannelPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ChannelPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/Accounts/{accountName}/Channels'} diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/operations.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/operations.py new file mode 100644 index 000000000000..e3b22207e1d3 --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/operations.py @@ -0,0 +1,98 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List operation of EngagementFabric resources. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.engagementfabric.models.OperationPaged[~azure.mgmt.engagementfabric.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.EngagementFabric/operations'} diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/sk_us_operations.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/sk_us_operations.py new file mode 100644 index 000000000000..55c4a1ef195c --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/operations/sk_us_operations.py @@ -0,0 +1,102 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SKUsOperations(object): + """SKUsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List available SKUs of EngagementFabric resource. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SkuDescription + :rtype: + ~azure.mgmt.engagementfabric.models.SkuDescriptionPaged[~azure.mgmt.engagementfabric.models.SkuDescription] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.SkuDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SkuDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EngagementFabric/skus'} diff --git a/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/version.py b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/version.py new file mode 100644 index 000000000000..b8bbafae36fe --- /dev/null +++ b/sdk/azure-mgmt-engagementfabric/azure/mgmt/engagementfabric/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2018-09-01-preview" +