Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-media] Dev mediaservices microsoft.media 2021 05 01 #4860

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/media/azure-mgmt-media/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/media/azure-mgmt-media/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "d1bb4b300905ab39a692f63050a9aaaaa30cebf9",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/mediaservices/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
"readme": "specification/mediaservices/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def __init__(
super(AzureMediaServices, 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-05-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
13 changes: 13 additions & 0 deletions sdk/media/azure-mgmt-media/azure/mgmt/media/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
try:
from ._models_py3 import AacAudio
from ._models_py3 import AbsoluteClipTime
from ._models_py3 import AccessControl
from ._models_py3 import AccountEncryption
from ._models_py3 import AccountFilter
from ._models_py3 import AkamaiAccessControl
Expand Down Expand Up @@ -105,6 +106,7 @@
from ._models_py3 import JpgFormat
from ._models_py3 import JpgImage
from ._models_py3 import JpgLayer
from ._models_py3 import KeyDelivery
from ._models_py3 import KeyVaultProperties
from ._models_py3 import Layer
from ._models_py3 import ListContainerSasInput
Expand All @@ -128,6 +130,7 @@
from ._models_py3 import LogSpecification
from ._models_py3 import MediaService
from ._models_py3 import MediaServiceIdentity
from ._models_py3 import MediaServiceUpdate
from ._models_py3 import MetricDimension
from ._models_py3 import MetricSpecification
from ._models_py3 import Mp4Format
Expand Down Expand Up @@ -192,6 +195,7 @@
except (SyntaxError, ImportError):
from ._models import AacAudio
from ._models import AbsoluteClipTime
from ._models import AccessControl
from ._models import AccountEncryption
from ._models import AccountFilter
from ._models import AkamaiAccessControl
Expand Down Expand Up @@ -285,6 +289,7 @@
from ._models import JpgFormat
from ._models import JpgImage
from ._models import JpgLayer
from ._models import KeyDelivery
from ._models import KeyVaultProperties
from ._models import Layer
from ._models import ListContainerSasInput
Expand All @@ -308,6 +313,7 @@
from ._models import LogSpecification
from ._models import MediaService
from ._models import MediaServiceIdentity
from ._models import MediaServiceUpdate
from ._models import MetricDimension
from ._models import MetricSpecification
from ._models import Mp4Format
Expand Down Expand Up @@ -388,9 +394,11 @@
CreatedByType,
MetricUnit,
MetricAggregationType,
ActionType,
StorageAccountType,
StorageAuthentication,
AccountEncryptionKeyType,
DefaultAction,
ManagedIdentityType,
PrivateEndpointConnectionProvisioningState,
PrivateEndpointServiceConnectionStatus,
Expand Down Expand Up @@ -443,6 +451,7 @@
__all__ = [
'AacAudio',
'AbsoluteClipTime',
'AccessControl',
'AccountEncryption',
'AccountFilter',
'AkamaiAccessControl',
Expand Down Expand Up @@ -536,6 +545,7 @@
'JpgFormat',
'JpgImage',
'JpgLayer',
'KeyDelivery',
'KeyVaultProperties',
'Layer',
'ListContainerSasInput',
Expand All @@ -559,6 +569,7 @@
'LogSpecification',
'MediaService',
'MediaServiceIdentity',
'MediaServiceUpdate',
'MetricDimension',
'MetricSpecification',
'Mp4Format',
Expand Down Expand Up @@ -638,9 +649,11 @@
'CreatedByType',
'MetricUnit',
'MetricAggregationType',
'ActionType',
'StorageAccountType',
'StorageAuthentication',
'AccountEncryptionKeyType',
'DefaultAction',
'ManagedIdentityType',
'PrivateEndpointConnectionProvisioningState',
'PrivateEndpointServiceConnectionStatus',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class MetricAggregationType(str, Enum):
total = "Total" #: The sum.


class ActionType(str, Enum):

internal = "Internal" #: An internal action.


class StorageAccountType(str, Enum):

primary = "Primary" #: The primary storage account for the Media Services account.
Expand All @@ -68,6 +73,12 @@ class AccountEncryptionKeyType(str, Enum):
customer_key = "CustomerKey" #: The Account Key is encrypted with a Customer Key.


class DefaultAction(str, Enum):

allow = "Allow" #: All public IP addresses are allowed.
deny = "Deny" #: Public IP addresses are blocked.


class ManagedIdentityType(str, Enum):

system_assigned = "SystemAssigned" #: A system-assigned managed identity.
Expand Down
124 changes: 124 additions & 0 deletions sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,29 @@ def __init__(self, **kwargs):
self.odatatype = '#Microsoft.Media.AbsoluteClipTime'


class AccessControl(Model):
"""AccessControl.

:param default_action: The behavior for IP access control in Key Delivery.
Possible values include: 'Allow', 'Deny'
:type default_action: str or ~azure.mgmt.media.models.DefaultAction
:param ip_allow_list: The IP allow list for access control in Key
Delivery. If the default action is set to 'Allow', the IP allow list must
be empty.
:type ip_allow_list: list[str]
"""

_attribute_map = {
'default_action': {'key': 'defaultAction', 'type': 'str'},
'ip_allow_list': {'key': 'ipAllowList', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(AccessControl, self).__init__(**kwargs)
self.default_action = kwargs.get('default_action', None)
self.ip_allow_list = kwargs.get('ip_allow_list', None)


class AccountEncryption(Model):
"""AccountEncryption.

Expand Down Expand Up @@ -4255,6 +4278,22 @@ def __init__(self, **kwargs):
self.odatatype = '#Microsoft.Media.JpgLayer'


class KeyDelivery(Model):
"""KeyDelivery.

:param access_control: The access control properties for Key Delivery.
:type access_control: ~azure.mgmt.media.models.AccessControl
"""

_attribute_map = {
'access_control': {'key': 'accessControl', 'type': 'AccessControl'},
}

def __init__(self, **kwargs):
super(KeyDelivery, self).__init__(**kwargs)
self.access_control = kwargs.get('access_control', None)


class KeyVaultProperties(Model):
"""KeyVaultProperties.

Expand Down Expand Up @@ -5031,6 +5070,9 @@ class MediaService(TrackedResource):
~azure.mgmt.media.models.StorageAuthentication
:param encryption: The account encryption properties.
:type encryption: ~azure.mgmt.media.models.AccountEncryption
:param key_delivery: The Key Delivery properties for Media Services
account.
:type key_delivery: ~azure.mgmt.media.models.KeyDelivery
:param identity: The Managed Identity for the Media Services account.
:type identity: ~azure.mgmt.media.models.MediaServiceIdentity
:ivar system_data: The system metadata relating to this resource.
Expand All @@ -5056,6 +5098,7 @@ class MediaService(TrackedResource):
'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'},
'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'},
'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'},
'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'},
'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'},
'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
Expand All @@ -5066,6 +5109,7 @@ def __init__(self, **kwargs):
self.storage_accounts = kwargs.get('storage_accounts', None)
self.storage_authentication = kwargs.get('storage_authentication', None)
self.encryption = kwargs.get('encryption', None)
self.key_delivery = kwargs.get('key_delivery', None)
self.identity = kwargs.get('identity', None)
self.system_data = None

Expand Down Expand Up @@ -5106,6 +5150,56 @@ def __init__(self, **kwargs):
self.tenant_id = None


class MediaServiceUpdate(Model):
"""A Media Services account update.

Variables are only populated by the server, and will be ignored when
sending a request.

:param tags: Resource tags.
:type tags: dict[str, str]
:ivar media_service_id: The Media Services account ID.
:vartype media_service_id: str
:param storage_accounts: The storage accounts for this resource.
:type storage_accounts: list[~azure.mgmt.media.models.StorageAccount]
:param storage_authentication: Possible values include: 'System',
'ManagedIdentity'
:type storage_authentication: str or
~azure.mgmt.media.models.StorageAuthentication
:param encryption: The account encryption properties.
:type encryption: ~azure.mgmt.media.models.AccountEncryption
:param key_delivery: The Key Delivery properties for Media Services
account.
:type key_delivery: ~azure.mgmt.media.models.KeyDelivery
:param identity: The Managed Identity for the Media Services account.
:type identity: ~azure.mgmt.media.models.MediaServiceIdentity
"""

_validation = {
'media_service_id': {'readonly': True},
}

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'media_service_id': {'key': 'properties.mediaServiceId', 'type': 'str'},
'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'},
'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'},
'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'},
'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'},
'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'},
}

def __init__(self, **kwargs):
super(MediaServiceUpdate, self).__init__(**kwargs)
self.tags = kwargs.get('tags', None)
self.media_service_id = None
self.storage_accounts = kwargs.get('storage_accounts', None)
self.storage_authentication = kwargs.get('storage_authentication', None)
self.encryption = kwargs.get('encryption', None)
self.key_delivery = kwargs.get('key_delivery', None)
self.identity = kwargs.get('identity', None)


class MetricDimension(Model):
"""A metric dimension.

Expand Down Expand Up @@ -5166,6 +5260,15 @@ class MetricSpecification(Model):
:type supported_aggregation_types: list[str]
:ivar dimensions: The metric dimensions.
:vartype dimensions: list[~azure.mgmt.media.models.MetricDimension]
:ivar enable_regional_mdm_account: Indicates whether regional MDM account
is enabled.
:vartype enable_regional_mdm_account: bool
:ivar source_mdm_account: The source MDM account.
:vartype source_mdm_account: str
:ivar source_mdm_namespace: The source MDM namespace.
:vartype source_mdm_namespace: str
:ivar supported_time_grain_types: The supported time grain types.
:vartype supported_time_grain_types: list[str]
"""

_validation = {
Expand All @@ -5176,6 +5279,10 @@ class MetricSpecification(Model):
'aggregation_type': {'readonly': True},
'lock_aggregation_type': {'readonly': True},
'dimensions': {'readonly': True},
'enable_regional_mdm_account': {'readonly': True},
'source_mdm_account': {'readonly': True},
'source_mdm_namespace': {'readonly': True},
'supported_time_grain_types': {'readonly': True},
}

_attribute_map = {
Expand All @@ -5187,6 +5294,10 @@ class MetricSpecification(Model):
'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'},
'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'},
'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'},
'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'},
'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'},
'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'},
'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'},
}

def __init__(self, **kwargs):
Expand All @@ -5199,6 +5310,10 @@ def __init__(self, **kwargs):
self.lock_aggregation_type = None
self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None)
self.dimensions = None
self.enable_regional_mdm_account = None
self.source_mdm_account = None
self.source_mdm_namespace = None
self.supported_time_grain_types = None


class MultiBitrateFormat(Format):
Expand Down Expand Up @@ -5355,6 +5470,11 @@ class Operation(Model):
:type origin: str
:param properties: Operation properties format.
:type properties: ~azure.mgmt.media.models.Properties
:param is_data_action: Whether the operation applies to data-plane.
:type is_data_action: bool
:param action_type: Indicates the action type. Possible values include:
'Internal'
:type action_type: str or ~azure.mgmt.media.models.ActionType
"""

_validation = {
Expand All @@ -5366,6 +5486,8 @@ class Operation(Model):
'display': {'key': 'display', 'type': 'OperationDisplay'},
'origin': {'key': 'origin', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'Properties'},
'is_data_action': {'key': 'isDataAction', 'type': 'bool'},
'action_type': {'key': 'actionType', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -5374,6 +5496,8 @@ def __init__(self, **kwargs):
self.display = kwargs.get('display', None)
self.origin = kwargs.get('origin', None)
self.properties = kwargs.get('properties', None)
self.is_data_action = kwargs.get('is_data_action', None)
self.action_type = kwargs.get('action_type', None)


class OperationDisplay(Model):
Expand Down
Loading