Skip to content

Commit

Permalink
CodeGen from PR 13024 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 8f0e5013bb2b72d502abc91d682e30bc92e5ba14 into 47b422a
  • Loading branch information
SDKAuto committed Mar 5, 2021
1 parent c891c27 commit 492fdd5
Show file tree
Hide file tree
Showing 22 changed files with 3,028 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sdk/communication/azure-mgmt-communication/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Release History

## 0.1.0 (1970-01-01)

* Initial Release
5 changes: 5 additions & 0 deletions sdk/communication/azure-mgmt-communication/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
include azure/mgmt/__init__.py

21 changes: 21 additions & 0 deletions sdk/communication/azure-mgmt-communication/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure MyService Management Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).


# Usage

For code examples, see [MyService Management](https://docs.microsoft.com/python/api/overview/azure/)
on docs.microsoft.com.


# Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-communication%2FREADME.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from ._configuration import CommunicationServiceManagementClientConfiguration
from ._communication_service_management_client import CommunicationServiceManagementClient
__all__ = ['CommunicationServiceManagementClient', 'CommunicationServiceManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

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

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

from ._configuration import CommunicationServiceManagementClientConfiguration
from .operations import Operations
from .operations import CommunicationServiceOperations
from .operations import OperationStatusesOperations
from . import models


class CommunicationServiceManagementClient(SDKClient):
"""REST API for Azure Communication Services
:ivar config: Configuration for client.
:vartype config: CommunicationServiceManagementClientConfiguration
:ivar operations: Operations operations
:vartype operations: azure.mgmt.communication.operations.Operations
:ivar communication_service: CommunicationService operations
:vartype communication_service: azure.mgmt.communication.operations.CommunicationServiceOperations
:ivar operation_statuses: OperationStatuses operations
:vartype operation_statuses: azure.mgmt.communication.operations.OperationStatusesOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

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

self.config = CommunicationServiceManagementClientConfiguration(credentials, subscription_id, base_url)
super(CommunicationServiceManagementClient, 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 = '2020-08-20'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.communication_service = CommunicationServiceOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operation_statuses = OperationStatusesOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrestazure import AzureConfiguration

from .version import VERSION


class CommunicationServiceManagementClientConfiguration(AzureConfiguration):
"""Configuration for CommunicationServiceManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
: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(CommunicationServiceManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-communication/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

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

try:
from ._models_py3 import AzureEntityResource
from ._models_py3 import CommunicationServiceKeys
from ._models_py3 import CommunicationServiceResource
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorDetail
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import LinkedNotificationHub
from ._models_py3 import LinkNotificationHubParameters
from ._models_py3 import LocationResource
from ._models_py3 import NameAvailability
from ._models_py3 import NameAvailabilityParameters
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationStatus
from ._models_py3 import ProxyResource
from ._models_py3 import RegenerateKeyParameters
from ._models_py3 import Resource
from ._models_py3 import SystemData
from ._models_py3 import TaggedResource
from ._models_py3 import TrackedResource
except (SyntaxError, ImportError):
from ._models import AzureEntityResource
from ._models import CommunicationServiceKeys
from ._models import CommunicationServiceResource
from ._models import ErrorAdditionalInfo
from ._models import ErrorDetail
from ._models import ErrorResponse, ErrorResponseException
from ._models import LinkedNotificationHub
from ._models import LinkNotificationHubParameters
from ._models import LocationResource
from ._models import NameAvailability
from ._models import NameAvailabilityParameters
from ._models import Operation
from ._models import OperationDisplay
from ._models import OperationStatus
from ._models import ProxyResource
from ._models import RegenerateKeyParameters
from ._models import Resource
from ._models import SystemData
from ._models import TaggedResource
from ._models import TrackedResource
from ._paged_models import CommunicationServiceResourcePaged
from ._paged_models import OperationPaged
from ._communication_service_management_client_enums import (
Status,
ProvisioningState,
CreatedByType,
KeyType,
Origin,
ActionType,
)

__all__ = [
'AzureEntityResource',
'CommunicationServiceKeys',
'CommunicationServiceResource',
'ErrorAdditionalInfo',
'ErrorDetail',
'ErrorResponse', 'ErrorResponseException',
'LinkedNotificationHub',
'LinkNotificationHubParameters',
'LocationResource',
'NameAvailability',
'NameAvailabilityParameters',
'Operation',
'OperationDisplay',
'OperationStatus',
'ProxyResource',
'RegenerateKeyParameters',
'Resource',
'SystemData',
'TaggedResource',
'TrackedResource',
'OperationPaged',
'CommunicationServiceResourcePaged',
'Status',
'ProvisioningState',
'CreatedByType',
'KeyType',
'Origin',
'ActionType',
]
Original file line number Diff line number Diff line change
@@ -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 enum import Enum


class Status(str, Enum):

succeeded = "Succeeded"
failed = "Failed"
canceled = "Canceled"
creating = "Creating"
deleting = "Deleting"
moving = "Moving"


class ProvisioningState(str, Enum):

unknown = "Unknown"
succeeded = "Succeeded"
failed = "Failed"
canceled = "Canceled"
running = "Running"
creating = "Creating"
updating = "Updating"
deleting = "Deleting"
moving = "Moving"


class CreatedByType(str, Enum):

user = "User"
application = "Application"
managed_identity = "ManagedIdentity"
key = "Key"


class KeyType(str, Enum):

primary = "Primary"
secondary = "Secondary"


class Origin(str, Enum):

user = "user"
system = "system"
usersystem = "user,system"


class ActionType(str, Enum):

internal = "Internal"
Loading

0 comments on commit 492fdd5

Please sign in to comment.