Skip to content

Commit

Permalink
CodeGen from PR 12581 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 0df1e13fcf9a7ea0041f4a0638314440c051fc59 into d88bf13
  • Loading branch information
SDKAuto committed Jan 24, 2021
1 parent 7477eac commit e120b2b
Show file tree
Hide file tree
Showing 41 changed files with 1,768 additions and 1,441 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .managed_services_client import ManagedServicesClient
from .version import VERSION
from ._configuration import ManagedServicesClientConfiguration
from ._managed_services_client import ManagedServicesClient
__all__ = ['ManagedServicesClient', 'ManagedServicesClientConfiguration']

__all__ = ['ManagedServicesClient']
from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 ManagedServicesClientConfiguration(AzureConfiguration):
"""Configuration for ManagedServicesClient
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 str base_url: Service URL
"""

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

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(ManagedServicesClientConfiguration, 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-managedservices/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,13 @@

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.registration_definitions_operations import RegistrationDefinitionsOperations
from .operations.registration_assignments_operations import RegistrationAssignmentsOperations
from .operations.operations import Operations
from . import models


class ManagedServicesClientConfiguration(AzureConfiguration):
"""Configuration for ManagedServicesClient
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 str base_url: Service URL
"""

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

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(ManagedServicesClientConfiguration, self).__init__(base_url)

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

self.credentials = credentials
from ._configuration import ManagedServicesClientConfiguration
from .operations import RegistrationDefinitionsOperations
from .operations import RegistrationAssignmentsOperations
from .operations import MarketplaceRegistrationDefinitionsOperations
from .operations import Operations
from . import models


class ManagedServicesClient(SDKClient):
Expand All @@ -56,6 +30,8 @@ class ManagedServicesClient(SDKClient):
:vartype registration_definitions: azure.mgmt.managedservices.operations.RegistrationDefinitionsOperations
:ivar registration_assignments: RegistrationAssignments operations
:vartype registration_assignments: azure.mgmt.managedservices.operations.RegistrationAssignmentsOperations
:ivar marketplace_registration_definitions: MarketplaceRegistrationDefinitions operations
:vartype marketplace_registration_definitions: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.managedservices.operations.Operations
Expand All @@ -72,13 +48,15 @@ def __init__(
super(ManagedServicesClient, 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 = '2019-06-01'
self.api_version = '2020-02-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.registration_definitions = RegistrationDefinitionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.registration_assignments = RegistrationAssignmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.marketplace_registration_definitions = MarketplaceRegistrationDefinitionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,70 @@
# --------------------------------------------------------------------------

try:
from .authorization_py3 import Authorization
from .registration_definition_properties_py3 import RegistrationDefinitionProperties
from .plan_py3 import Plan
from .registration_definition_py3 import RegistrationDefinition
from .registration_assignment_properties_registration_definition_properties_py3 import RegistrationAssignmentPropertiesRegistrationDefinitionProperties
from .registration_assignment_properties_registration_definition_py3 import RegistrationAssignmentPropertiesRegistrationDefinition
from .registration_assignment_properties_py3 import RegistrationAssignmentProperties
from .registration_assignment_py3 import RegistrationAssignment
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .operation_list_py3 import OperationList
from .error_response_error_py3 import ErrorResponseError
from .error_response_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import Authorization
from ._models_py3 import EligibleAuthorization
from ._models_py3 import ErrorDefinition
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import JustInTimeAccessPolicy
from ._models_py3 import MarketplaceRegistrationDefinition
from ._models_py3 import MarketplaceRegistrationDefinitionProperties
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationList
from ._models_py3 import Plan
from ._models_py3 import RegistrationAssignment
from ._models_py3 import RegistrationAssignmentProperties
from ._models_py3 import RegistrationAssignmentPropertiesRegistrationDefinition
from ._models_py3 import RegistrationAssignmentPropertiesRegistrationDefinitionProperties
from ._models_py3 import RegistrationDefinition
from ._models_py3 import RegistrationDefinitionProperties
except (SyntaxError, ImportError):
from .authorization import Authorization
from .registration_definition_properties import RegistrationDefinitionProperties
from .plan import Plan
from .registration_definition import RegistrationDefinition
from .registration_assignment_properties_registration_definition_properties import RegistrationAssignmentPropertiesRegistrationDefinitionProperties
from .registration_assignment_properties_registration_definition import RegistrationAssignmentPropertiesRegistrationDefinition
from .registration_assignment_properties import RegistrationAssignmentProperties
from .registration_assignment import RegistrationAssignment
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list import OperationList
from .error_response_error import ErrorResponseError
from .error_response import ErrorResponse, ErrorResponseException
from .registration_definition_paged import RegistrationDefinitionPaged
from .registration_assignment_paged import RegistrationAssignmentPaged
from .managed_services_client_enums import (
from ._models import Authorization
from ._models import EligibleAuthorization
from ._models import ErrorDefinition
from ._models import ErrorResponse, ErrorResponseException
from ._models import JustInTimeAccessPolicy
from ._models import MarketplaceRegistrationDefinition
from ._models import MarketplaceRegistrationDefinitionProperties
from ._models import Operation
from ._models import OperationDisplay
from ._models import OperationList
from ._models import Plan
from ._models import RegistrationAssignment
from ._models import RegistrationAssignmentProperties
from ._models import RegistrationAssignmentPropertiesRegistrationDefinition
from ._models import RegistrationAssignmentPropertiesRegistrationDefinitionProperties
from ._models import RegistrationDefinition
from ._models import RegistrationDefinitionProperties
from ._paged_models import MarketplaceRegistrationDefinitionPaged
from ._paged_models import RegistrationAssignmentPaged
from ._paged_models import RegistrationDefinitionPaged
from ._managed_services_client_enums import (
MultiFactorAuthProvider,
ProvisioningState,
)

__all__ = [
'Authorization',
'RegistrationDefinitionProperties',
'Plan',
'RegistrationDefinition',
'RegistrationAssignmentPropertiesRegistrationDefinitionProperties',
'RegistrationAssignmentPropertiesRegistrationDefinition',
'RegistrationAssignmentProperties',
'RegistrationAssignment',
'OperationDisplay',
'EligibleAuthorization',
'ErrorDefinition',
'ErrorResponse', 'ErrorResponseException',
'JustInTimeAccessPolicy',
'MarketplaceRegistrationDefinition',
'MarketplaceRegistrationDefinitionProperties',
'Operation',
'OperationDisplay',
'OperationList',
'ErrorResponseError',
'ErrorResponse', 'ErrorResponseException',
'Plan',
'RegistrationAssignment',
'RegistrationAssignmentProperties',
'RegistrationAssignmentPropertiesRegistrationDefinition',
'RegistrationAssignmentPropertiesRegistrationDefinitionProperties',
'RegistrationDefinition',
'RegistrationDefinitionProperties',
'RegistrationDefinitionPaged',
'RegistrationAssignmentPaged',
'MarketplaceRegistrationDefinitionPaged',
'MultiFactorAuthProvider',
'ProvisioningState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
from enum import Enum


class MultiFactorAuthProvider(str, Enum):

azure = "Azure"
none = "None"


class ProvisioningState(str, Enum):

not_specified = "NotSpecified"
Expand Down
Loading

0 comments on commit e120b2b

Please sign in to comment.