Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,22 @@
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
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,58 @@ def internal_paging(next_link=None, raw=False):
return deserialized
list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Features/features'}

def operations(
self, custom_headers=None, raw=False, **operation_config):
"""Gets all the preview feature operations.

: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<msrest:optionsforoperations>`.
:return: OperationsList or ClientRawResponse if raw=true
:rtype:
~azure.mgmt.resource.features.v2015_12_01.models.OperationsList or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.operations.metadata['url']

# Construct parameters
query_parameters = {}

# Construct headers
header_parameters = {}
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 and send request
request = self._client.get(url, query_parameters)
response = self._client.send(request, header_parameters, 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('OperationsList', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
operations.metadata = {'url': '/providers/Microsoft.Features/operations'}

def list(
self, resource_provider_namespace, custom_headers=None, raw=False, **operation_config):
"""Gets all the preview features in a provider namespace that are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from .version import VERSION
from .operations.applications_operations import ApplicationsOperations
from .operations.application_definitions_operations import ApplicationDefinitionsOperations
from .operations.solutions_operations import SolutionsOperations
from . import models


Expand Down Expand Up @@ -60,6 +61,8 @@ class ApplicationClient(SDKClient):
:vartype applications: azure.mgmt.resource.managedapplications.operations.ApplicationsOperations
:ivar application_definitions: ApplicationDefinitions operations
:vartype application_definitions: azure.mgmt.resource.managedapplications.operations.ApplicationDefinitionsOperations
:ivar solutions: Solutions operations
:vartype solutions: azure.mgmt.resource.managedapplications.operations.SolutionsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -84,3 +87,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.application_definitions = ApplicationDefinitionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.solutions = SolutionsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
from .generic_resource_py3 import GenericResource
from .resource_py3 import Resource
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .operation_display_py3 import OperationDisplay
from .operation_definition_py3 import OperationDefinition
from .operations_list_py3 import OperationsList
except (SyntaxError, ImportError):
from .plan import Plan
from .application import Application
Expand All @@ -35,6 +38,9 @@
from .generic_resource import GenericResource
from .resource import Resource
from .error_response import ErrorResponse, ErrorResponseException
from .operation_display import OperationDisplay
from .operation_definition import OperationDefinition
from .operations_list import OperationsList
from .application_paged import ApplicationPaged
from .application_definition_paged import ApplicationDefinitionPaged
from .application_client_enums import (
Expand All @@ -57,6 +63,9 @@
'GenericResource',
'Resource',
'ErrorResponse', 'ErrorResponseException',
'OperationDisplay',
'OperationDefinition',
'OperationsList',
'ApplicationPaged',
'ApplicationDefinitionPaged',
'ProvisioningState',
Expand Down
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.managedapplications.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)
Loading