Skip to content
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -49,7 +49,7 @@ def __init__(
self.subscription_id = subscription_id


class FeatureClient(object):
class FeatureClient(SDKClient):
"""Azure Feature Exposure Control (AFEC) provides a mechanism for the resource providers to control feature exposure to users. Resource providers typically use this mechanism to provide public/private preview for new features prior to making them generally available. Users need to explicitly register for AFEC features to get access to such functionality.

:ivar config: Configuration for client.
Expand All @@ -70,7 +70,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = FeatureClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(FeatureClient, 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 = '2015-12-01'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,25 @@
# regenerated.
# --------------------------------------------------------------------------

from .feature_properties import FeatureProperties
from .feature_result import FeatureResult
try:
from .feature_properties_py3 import FeatureProperties
from .feature_result_py3 import FeatureResult
from .operation_display_py3 import OperationDisplay
from .operation_definition_py3 import OperationDefinition
from .operations_list_py3 import OperationsList
except (SyntaxError, ImportError):
from .feature_properties import FeatureProperties
from .feature_result import FeatureResult
from .operation_display import OperationDisplay
from .operation_definition import OperationDefinition
from .operations_list import OperationsList
from .feature_result_paged import FeatureResultPaged

__all__ = [
'FeatureProperties',
'FeatureResult',
'OperationDisplay',
'OperationDefinition',
'OperationsList',
'FeatureResultPaged',
]
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ class FeatureProperties(Model):
'state': {'key': 'state', 'type': 'str'},
}

def __init__(self, state=None):
super(FeatureProperties, self).__init__()
self.state = state
def __init__(self, **kwargs):
super(FeatureProperties, self).__init__(**kwargs)
self.state = kwargs.get('state', None)
Original file line number Diff line number Diff line change
@@ -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 FeatureProperties(Model):
"""Information about feature.

:param state: The registration state of the feature for the subscription.
:type state: str
"""

_attribute_map = {
'state': {'key': 'state', 'type': 'str'},
}

def __init__(self, *, state: str=None, **kwargs) -> None:
super(FeatureProperties, self).__init__(**kwargs)
self.state = state
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class FeatureResult(Model):
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, name=None, properties=None, id=None, type=None):
super(FeatureResult, self).__init__()
self.name = name
self.properties = properties
self.id = id
self.type = type
def __init__(self, **kwargs):
super(FeatureResult, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.properties = kwargs.get('properties', None)
self.id = kwargs.get('id', None)
self.type = kwargs.get('type', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 FeatureResult(Model):
"""Previewed feature information.

:param name: The name of the feature.
:type name: str
:param properties: Properties of the previewed feature.
:type properties:
~azure.mgmt.resource.features.v2015_12_01.models.FeatureProperties
:param id: The resource ID of the feature.
:type id: str
:param type: The resource type of the feature.
:type type: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'FeatureProperties'},
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, name: str=None, properties=None, id: str=None, type: str=None, **kwargs) -> None:
super(FeatureResult, self).__init__(**kwargs)
self.name = name
self.properties = properties
self.id = id
self.type = type
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 OperationDefinition(Model):
"""OperationDefinition.

:param name: The name of the operation.
:type name: str
:param display: The operation display definition.
:type display:
~azure.mgmt.resource.features.v2015_12_01.models.OperationDisplay
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self, **kwargs):
super(OperationDefinition, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display = kwargs.get('display', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 OperationDefinition(Model):
"""OperationDefinition.

:param name: The name of the operation.
:type name: str
:param display: The operation display definition.
:type display:
~azure.mgmt.resource.features.v2015_12_01.models.OperationDisplay
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self, *, name: str=None, display=None, **kwargs) -> None:
super(OperationDefinition, self).__init__(**kwargs)
self.name = name
self.display = display
Original file line number Diff line number Diff line change
@@ -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 OperationDisplay(Model):
"""OperationDisplay.

:param provider: Operation provider.
:type provider: str
:param resource: Operation resource.
:type resource: str
:param operation: Operation.
:type operation: str
:param description: Operation description.
:type description: str
"""

_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 = kwargs.get('provider', None)
self.resource = kwargs.get('resource', None)
self.operation = kwargs.get('operation', None)
self.description = kwargs.get('description', None)
Original file line number Diff line number Diff line change
@@ -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 OperationDisplay(Model):
"""OperationDisplay.

:param provider: Operation provider.
:type provider: str
:param resource: Operation resource.
:type resource: str
:param operation: Operation.
:type operation: str
:param description: Operation description.
:type description: str
"""

_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, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None:
super(OperationDisplay, self).__init__(**kwargs)
self.provider = provider
self.resource = resource
self.operation = operation
self.description = description
Original file line number Diff line number Diff line change
@@ -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 OperationsList(Model):
"""OperationsList.

:param operations: The array of feature operations.
:type operations:
list[~azure.mgmt.resource.features.v2015_12_01.models.OperationDefinition]
"""

_attribute_map = {
'operations': {'key': 'operations', 'type': '[OperationDefinition]'},
}

def __init__(self, **kwargs):
super(OperationsList, self).__init__(**kwargs)
self.operations = kwargs.get('operations', None)
Original file line number Diff line number Diff line change
@@ -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 OperationsList(Model):
"""OperationsList.

:param operations: The array of feature operations.
:type operations:
list[~azure.mgmt.resource.features.v2015_12_01.models.OperationDefinition]
"""

_attribute_map = {
'operations': {'key': 'operations', 'type': '[OperationDefinition]'},
}

def __init__(self, *, operations=None, **kwargs) -> None:
super(OperationsList, self).__init__(**kwargs)
self.operations = operations
Loading