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-managementpartner] add managementpartner track2 config #3332

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 @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .ace_provisioning_management_partner_api import ACEProvisioningManagementPartnerAPI
from .version import VERSION
from ._configuration import ACEProvisioningManagementPartnerAPIConfiguration
from ._ace_provisioning_management_partner_api import ACEProvisioningManagementPartnerAPI
__all__ = ['ACEProvisioningManagementPartnerAPI', 'ACEProvisioningManagementPartnerAPIConfiguration']

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

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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 ACEProvisioningManagementPartnerAPIConfiguration
from .operations import PartnerOperations
from .operations import OperationOperations
from .operations import PartnersOperations
from . import models


class ACEProvisioningManagementPartnerAPI(SDKClient):
"""This API describe ACE Provisioning ManagementPartner

:ivar config: Configuration for client.
:vartype config: ACEProvisioningManagementPartnerAPIConfiguration

:ivar partner: Partner operations
:vartype partner: azure.mgmt.managementpartner.operations.PartnerOperations
:ivar operation: Operation operations
:vartype operation: azure.mgmt.managementpartner.operations.OperationOperations
:ivar partners: Partners operations
:vartype partners: azure.mgmt.managementpartner.operations.PartnersOperations

: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):

self.config = ACEProvisioningManagementPartnerAPIConfiguration(credentials, base_url)
super(ACEProvisioningManagementPartnerAPI, 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 = '2018-02-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.partner = PartnerOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operation = OperationOperations(
self._client, self.config, self._serialize, self._deserialize)
self.partners = PartnersOperations(
self._client, self.config, self._serialize, self._deserialize)
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 ACEProvisioningManagementPartnerAPIConfiguration(AzureConfiguration):
"""Configuration for ACEProvisioningManagementPartnerAPI
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(ACEProvisioningManagementPartnerAPIConfiguration, 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-managementpartner/{}'.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 @@ -10,24 +10,24 @@
# --------------------------------------------------------------------------

try:
from .partner_response_py3 import PartnerResponse
from .extended_error_info_py3 import ExtendedErrorInfo
from .error_py3 import Error, ErrorException
from .operation_display_py3 import OperationDisplay
from .operation_response_py3 import OperationResponse
from ._models_py3 import Error, ErrorException
from ._models_py3 import ExtendedErrorInfo
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationResponse
from ._models_py3 import PartnerResponse
except (SyntaxError, ImportError):
from .partner_response import PartnerResponse
from .extended_error_info import ExtendedErrorInfo
from .error import Error, ErrorException
from .operation_display import OperationDisplay
from .operation_response import OperationResponse
from .operation_response_paged import OperationResponsePaged
from ._models import Error, ErrorException
from ._models import ExtendedErrorInfo
from ._models import OperationDisplay
from ._models import OperationResponse
from ._models import PartnerResponse
from ._paged_models import OperationResponsePaged

__all__ = [
'PartnerResponse',
'ExtendedErrorInfo',
'Error', 'ErrorException',
'ExtendedErrorInfo',
'OperationDisplay',
'OperationResponse',
'PartnerResponse',
'OperationResponsePaged',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
# 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
from msrest.exceptions import HttpOperationError


class CloudError(Model):
"""CloudError.
"""

_attribute_map = {
}


class Error(Model):
"""this is the management partner operations error.

:param error: this is the ExtendedErrorInfo property
:type error: ~azure.mgmt.managementpartner.models.ExtendedErrorInfo
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ExtendedErrorInfo'},
}

def __init__(self, **kwargs):
super(Error, self).__init__(**kwargs)
self.error = kwargs.get('error', None)


class ErrorException(HttpOperationError):
"""Server responsed with exception of type: 'Error'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorException, self).__init__(deserialize, response, 'Error', *args)


class ExtendedErrorInfo(Model):
"""this is the extended error info.

:param code: this is the error response code. Possible values include:
'NotFound', 'Conflict', 'BadRequest'
:type code: str or ~azure.mgmt.managementpartner.models.enum
:param message: this is the extended error info message
:type message: str
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ExtendedErrorInfo, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)


class OperationDisplay(Model):
"""this is the management partner operation.

:param provider: the is management partner provider
:type provider: str
:param resource: the is management partner resource
:type resource: str
:param operation: the is management partner operation
:type operation: str
:param description: the is management partner 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)


class OperationResponse(Model):
"""this is the management partner operations response.

:param name: this is the operation response name
:type name: str
:param display: this is the operation display
:type display: ~azure.mgmt.managementpartner.models.OperationDisplay
:param origin: the is operation response origin information
:type origin: str
"""

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

def __init__(self, **kwargs):
super(OperationResponse, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display = kwargs.get('display', None)
self.origin = kwargs.get('origin', None)


class PartnerResponse(Model):
"""this is the management partner operations response.

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

:param etag: Type of the partner
:type etag: int
:ivar id: Identifier of the partner
:vartype id: str
:ivar name: Name of the partner
:vartype name: str
:param partner_id: This is the partner id
:type partner_id: str
:param partner_name: This is the partner name
:type partner_name: str
:param tenant_id: This is the tenant id.
:type tenant_id: str
:param object_id: This is the object id.
:type object_id: str
:param version: This is the version.
:type version: int
:param updated_time: This is the DateTime when the partner was updated.
:type updated_time: datetime
:param created_time: This is the DateTime when the partner was created.
:type created_time: datetime
:param state: This is the partner state. Possible values include:
'Active', 'Deleted'
:type state: str or ~azure.mgmt.managementpartner.models.enum
:ivar type: Type of resource. "Microsoft.ManagementPartner/partners"
:vartype type: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'etag': {'key': 'etag', 'type': 'int'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'partner_id': {'key': 'properties.partnerId', 'type': 'str'},
'partner_name': {'key': 'properties.partnerName', 'type': 'str'},
'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
'object_id': {'key': 'properties.objectId', 'type': 'str'},
'version': {'key': 'properties.version', 'type': 'int'},
'updated_time': {'key': 'properties.updatedTime', 'type': 'iso-8601'},
'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'},
'state': {'key': 'properties.state', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PartnerResponse, self).__init__(**kwargs)
self.etag = kwargs.get('etag', None)
self.id = None
self.name = None
self.partner_id = kwargs.get('partner_id', None)
self.partner_name = kwargs.get('partner_name', None)
self.tenant_id = kwargs.get('tenant_id', None)
self.object_id = kwargs.get('object_id', None)
self.version = kwargs.get('version', None)
self.updated_time = kwargs.get('updated_time', None)
self.created_time = kwargs.get('created_time', None)
self.state = kwargs.get('state', None)
self.type = None
Loading