From 0619e202324ccf7a225805938449bb49f380e6d5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 5 Jan 2021 17:54:27 +0000 Subject: [PATCH] CodeGen from PR 12289 in Azure/azure-rest-api-specs Get latest master (#12289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Hub Generated] Review request for Microsoft.AlertsManagement to add version stable/2019-06-01 (#11833) * Changing Swagger file * Changing examples * Fixing tags example * Fixing tags example * Fixing tags example * prettier fix for white spaces * Enable azure-sdk-for-net-track2 (#12169) * Updating existing CRR APIs with zone restore feature (#12157) * - Added change for support of cross zone restores. * - updating example json * - Fixing prettier * lastUpdatedDate for templates (#11900) * lastUpdatedDate for templates * fix * [Hub Generated] Review request for Microsoft.AppPlatform to add version preview/2020-11-01-preview (#11823) * Adds base for updating Microsoft.AppPlatform from version stable/2020-07-01 to version 2020-11-01-preview * Updates readme * Updates API version in new specs and examples * Introduce additional change to 2020-11-01-preview. * Additional properties to monitoringSettings. * Readonly properties to requiredTraffics. Signed-off-by: Pan Li * Make credscan happy. Signed-off-by: Pan Li * [Hub Generated] Review request for Microsoft.Consumption to add version stable/2019-10-01 (#12113) * Fix linter and swagger warnings * Fix errors * Removed unneeded change * [ASC.Automations] Add new data type "RegulatoryComplianceAssessment" (#12185) * Add SubAssessment event source type and add more automations examples * Change Location isReadOnlu to false * Test * Add new read/write location and add new type TrackedResourceLocation * Minor * minor * prettier fixes * Change variable name to TrackedResourceLocation * Change type name TrackedResourceLocation to AzureTrackedResourceLocation * Update automations example * Add SecureScores & SecureScoreControls as new supported datatypes in Automations resource * [ASC.Automations] add new data type RegulatoryComplianceAssessment * add datalake store track2 config (#12186) * cleanup old pipeline dependencies (#11889) * cleanup pipeline deps * add rest-api-specs-scripts * Extending recovery network input in replication intent API to support new network creation (#12191) * [Hub Generated] Review request for Microsoft.Maps to add version preview/2020-02-01-preview (#12172) * Adding operations for Maps Creator resource. * Fixing typo. * Adds suppression to readme * Adds suppression to readme * Adds suppression to readme * Adds suppression to readme * Resolving linter errors. * Minor update. * Updating all reference to v2 schema. * Marked private atlas as deprecated in description. * add operationsmanagement track2 config (#12141) * Update comment.yml (#12202) Add ARM traffic query link. When add breakingChangeReviewRequired * Adding new properties to response body (#12201) * adding new properties * updating examples * prettier fix * [Hub Generated] Review request for Microsoft.ContainerService to add version stable/2020-12-01 (#12064) * Add autorest.az configurations for azure monitor control service (#12090) * add AMCS config for codegen * reorganize command group * rename command group * Codegen modify try to rename DataCollectionRules create parameters * hide DataCollectionRules Create & Update commands and DataCollectionRuleAssociations Create command * use alias instand of rename in code-gen * use monitor-control-service as the extension name * Update readme.python.md * add logic track2 config (#12166) * add alertsmanagement track2 config (#11759) * Update comment.yml (#12213) * add mixedreality track2 confi (#12070) * add signalr track2 config (#11892) * add cognitiveservice track2 config (#11498) * add machinglearningservices track2 config (#12183) * add apimanagement track2 config (#12187) * add serialconsole track2 config (#12046) * Update TransparentDataEncryption Group Name (#12160) * update TransparentDataEncryption Group name * update reference of TransparentDataEncryption * Update readme.python.md (#12216) * Required changes for Azure HealthBot swagger (#12124) * Fixes for SDK generation files. * Fixes for SDK generation files. * Added GO. * Change Healthcare bot to Healthbot. * 1. Remove unused properties of SKU. 2. Removed unused CheckNameAvailability.json 3. Remove subgroup. * Sku is required. * [Hub Generated] Review request for Microsoft.IoTCentral to add version stable/2018-09-01 (#12224) * update to name * update * add api-version of guest configuration to go SDK (#12217) * add api-version for templatespecs (#12197) * Update specificationRepositoryConfiguration.json (#12218) * Adding new api version to devops RP (#11585) * Initial commit as per PR review * Actual changes to api spec for new version * Switching to multi-api build for python * Fix python spec to correct namespaces in multiapi mode * Revert changes to python generation * Add systemdata * Fix the path for sys data reference * Fix path once more * remove additional properties after including systemdata * Remove more addtional properties * Move system data to root * Fix wrong output-folder (#12229) * Remove swagger and examples because the controller will be used for private preview. (#12177) * Update pull_request_assignment.yml (#12230) * [Hub Generated] Review request for Microsoft.StorageCache to add version stable/2020-10-01 (#11407) * Init the next version so diffs can work better. * Updates readme * Updates API version in new specs and examples * Updates to StorageTargetProperties and added examples of cmk, mtu Add 202 to the storage cache and storage target create/update and update examples Fix ST no junction example's 202 response. add properties for nfs extended groups fix issues with extended groups properties found with autorest add properties and objects for Active Directory username download undo unintended change changes from comments in pull request AccessPolicy support. Example fixes for Access Policies. Fix attribute names to match latest RP. update to credential properties for LDAP and Active Directory marking password properties with x-ms-secret tag minor changes on extended groups and add examples Added blob NFS and some other validation fixes. Update required property for domainName from dnsName Updated blobNfs examples and some kpi fixes. Correct validation errors in examples. Added systemdata to resources. Remove x-ms-secret in keyvault reference due to linter error and common types not using it. Remove blobNfs from this version. Remove blobNfs from spec file. Remove x-ms-secret due to linter errors. Fix certificate spelling. Updating prettier and spell check errors. Used prettier on main spec file. Readded x-ms-secret that open api hub failed on but the PR pipeline allows. * Add prettier fix after rebase * Remove 202 bodies and add systemData to examples. * Update spec with prettier. * Address comments on spec for descriptions, readmes, and extendedGroupsEnabled. * Updating to address addition ldap and pattern comments. * Update version tag to include 01 * Restore changes that would be considered breaking changes matching 2020-03-01 * Address a few other comments. * Update netbios field names and some descriptions. * Fix s360 for missing debugInfo operation. * Fix credscan error in example file. * Update required fields, new validator failure on debugInfo return codes, and bindPassword example value. * Update debug info example with new return codes. * Update other credscan password errors. * Update Semantic-and-Model-Violations-Reference.md (#12199) Adding secret_property code, update some other codes. * ADP - add system metadata to dataPool (#12179) * Swagger Linting Fix (#12162) * Fix Linting Issuing * no message * fix description * add description and object back * test to resolve model validation test (cherry picked from commit ab273dfc0d5897683c128ee15da4babafa7a85ba) * [SQL][V20180601] Updating LocationCapabilities spec (#12032) * [SQL][V20180601] Updating LocationCapabilities spec * Fill 2020 versions * Rollback V2018 changes and bump LocationCapabilities in V4 to 2020-08-01-preview * update order for CI-FixRequiredOnFailure (#12227) * update rdbms track2 config (#12245) * ADT: refix path (#12161) * python track2 configure (#12150) * Add and remove owner for service principals (#12081) * [Hub Generated] Review request for Microsoft.MixedReality to add version stable/2020-05-01 (#11810) * fix spec * fix prettier * [Hub Generated] Review request for Microsoft.MixedReality to add version preview/2019-12-02-preview (#11769) * fix for swagger completeness * forgot curly brace * fix example * Api Management - make /tenant endpoints ARM compliant in 2020-06-01-preview version (#11549) * Adds base for updating Microsoft.ApiManagement from version stable/2019-12-01 to version 2020-06-01-preview * Updates readme * Updates API version in new specs and examples * Add support in API Management for Availability Zones (#10284) * apim in azs * fix prettier check * PATCH should return 200 OK (#10328) * add support for PATCH returning 200 OK * CI fixes prettier fix CI fixes part 2 * Password no longer a mandatory property when uploading Certificates * add missing x-ms-odata extension for filter support * +gatewayhostnameconfiguration protocol changes (#10292) * [2020-06-01-preview] Update Oauth Server secrets Contract (#10602) * Oauth server secrets contract * fix azureMonitor enum * API Management Service Deleted Services Resource (#10607) * API Management Service Deleted Services Resource * Path fix * Lint + custom-words fixes * Location URI parameter for deletedservices Resource * GET for deletedservices by service name * Remove resourceGroupName from resource path * fixes * schema for purge operation * perttier applied * 204 response code added Co-authored-by: REDMOND\glfeokti * OperationNameFormat property added to Diagnostic contract (#10641) * OperationNameFormat property added to Diagnostic contract * add azuremonitor to update contract Co-authored-by: REDMOND\glfeokti * [Microsoft.ApiManagement][2020-06-01-preview] Change Network Status response contract (#10331) * Change Network Status response contract * Update examples for network status contract * ApiManagement - tenant/settings endpoints * ApiManagement - tenant/settings endpoints fix * ApiManagement - tenant/settings endpoints fix prettier * ApiManagement - tenant/settings endpoints fix 3 * ApiManagement - tenant/settings endpoints fix 4 * ApiManagement - tenant/settings endpoints fix 5 Co-authored-by: Samir Solanki Co-authored-by: maksimkim Co-authored-by: promoisha Co-authored-by: REDMOND\glfeokti Co-authored-by: RupengLiu Co-authored-by: vfedonkin * Add "mail" parameter to UserUpdateParameters in graphrbac (#12127) This patch adds a single optional field "mail" to UserUpdateParameters schema. This makes it possible to update user's e-mail address using the (Go) Azure SDK. Currently this is not possible. I have curled the graphrbac API with the extra body parameter and it works as expected. Addition of the field will make it possible to support the mail property on the azuread_user resource in terraform-provider-azuread. Co-authored-by: David Čepelík * [Hub Generated] Review request for Microsoft.Advisor to add version stable/2020-01-01 (#12262) * add resourcegraph track2 config (#12122) * add reservations track2 config (#12027) * Removing a readonly tag from a property (#12254) * Fix swagger correctness errors (#12246) * Fix swagger correctness issues in Security for Iot service * changed int format from 32 to 64 * Add systemData to iotSecuritySolutions Co-authored-by: Liran Chen * [Hub Generated] Review request for Microsoft.Consumption to add version stable/2019-10-01 (#12196) * AAS - Swagger Linting and Correctness Fix (#12176) * Fix R4013 IntegerTypeMustHaveFormat * Fix R4010 RequiredDefaultResponse * Fix R4007 DefaultErrorResponseSchema * removed extra bracket * fix semantic issue * add type error * Fix linting issue * test to resolve model validation test * Revert "test to resolve model validation test" This reverts commit ab273dfc0d5897683c128ee15da4babafa7a85ba. * Resolve Model Validation Issue * Resolve Model Validation Issue v2 * test - add missing properties (cherry picked from commit 48ec27c51cc61f4b3c05b531618f40b7c2f77de6) * fix format * set default value * add x-ms-enum * fix nit * Add missing property * add missing properties * add missing bracket * change GatewayListStatusLive type * add missing "origin" property * fix model validation * Revert "change GatewayListStatusLive type" This reverts commit 4f3fa743d5ce91bea6bcf83474e6e3fc15bc3483. * Revert "fix model validation" This reverts commit 945bc233b9e623b2d90f7903b8b4dee94d873aa8. * add redhatopenshift track2 config (#12045) * [Hub Generated] Review request for Microsoft.CostManagement to add version stable/2019-10-01 (#12194) * Adding nextLink and previousLink to Tags endpoint properties * moving properties out * prettier check fix Co-authored-by: Jorge Chavez Nieto * add relay track2 config (#11495) * update healthbot t2 config (#12269) * update healthbot t2 config * fix readme * add automation track2 config (#11628) * add automation track2 config * update config * Azure Remote Rendering REST API swagger file - for review (#12015) * Azure Remote Rendering API specifcation * fix schema issue * fix examples * fix request bodies integer values, :stop path * pointing readme.md to open api spec for ARR * fix typo, add custom words * add msvc to custom words * fix readme.md * ran prettifier * fix reference to json * reference sts from file as well * fix readme.md * changes to readme.md * remove example from error to fix error * add 200 OK status for retried PUT for conversions and sessiosn * ran prettier * make autorest linter not crash * fix casing of nextLinkName paramter * factor out conversion list response * add examples for conversions * adding examples for sessions, prettify files * [Hub Generated] Review request for Microsoft.Maps/Microsoft.Maps to add version preview/2.0 (#12175) * microsoft.imagery 512 not supported Adding micorosft.imagery to 512 tile not supported list * Updating Raster Tilesets to Have Max Zoom 22 Certain raster tilesets now support up to zoom level 22. * minor changes to swagger (#12253) * minor changes to swagger * reverting sdk definitions file * Add addons to AVS 2020-07-17-preview (#12236) * found missing AVS/privateclouds/addons commit, moving it to 2020-07-17-preview API from PR repo * fixed prettier errors * Fixed vladation warnings for x-ms-enum and missing description/title, related to addons * fixed validation error for missing systemData for addons responses * fixed prettier errors * fixed validation error for missing systemData for addons responses * systemData for any Resource * make sure systemData is readOnly * systemData needs to go in a new api version * suppress systemData error Co-authored-by: Cameron Taggart * Azs api bug fix (#12133) * Old api version for ComputeOperationResult * Api Bugfix for Azure Stack Fabric Admin * Fix for typo in readme * Add default reponse * Fix example issue for default error * Update comment.yml (#12273) * [Hub Generated] Review request for Microsoft.CostManagement to add version stable/2019-11-01 (#12031) * fix dataSet typo * fix dimensions and tags typo * more dimensions and tags to fix * one more miss on dimensions and tags * Add the includeMonetaryCommitment missing field * fix spell check error * make property read only * remove the not operation from query filters * New backup service api version (#12171) * Initial commit: adding new api version * - new api 2020-12-01 * updating the readme.md package reference * - adding the zone information for new api * - updating api-version in examples - added 'zone' in Get recoverypoint api example json * Fixing prettier issue * Revert "- updating api-version in examples" This reverts commit 80baa9fcec1293bd3a51875d793f2178964fce52. * - adding api-version in examples * adding new api version in package mds * [IotHub] Introducing networkRuleSets in IotHubProperties [2020-08-31 : preview and stable ] (#10853) * Adds base for updating Microsoft.Devices from version preview/2020-07-10-preview to version 2020-08-31-preview * Updates readme * Updates API version in new specs and examples * Adds base for updating Microsoft.Devices from version stable/2020-08-01 to version 2020-08-31 * Updates readme * Updates API version in new specs and examples * Adding networkRuleSets support for iothub * Adding networkRuleSets Support in preview version * Adding Examples, correcting order in iothub.json * Updating Readme to have stable and previe versions * Modifying Tag to package-2020-08-31 * Adding Arm identity properties from 2020-07-010-preview version * Removing creds * minor fix * swagger correctness fix (#12101) * swagger correctness fix * update preview version too * Revert change and add defaults (#12243) * Remove gallery preview version 2020-09-30 from stable release (#12222) * add managementpartner track2 config (#12043) * [Hub Generated] Review request for Microsoft.Insights to add version stable/2019-03-01 (#12232) * Fixed swagger validations for api version 2019 * reverted error response change and suppress * removed redundant error details * renamed suppression rule * fixed suppression Co-authored-by: napolish <67951636+napolish@users.noreply.github.com> Co-authored-by: Phoenix He Co-authored-by: arpja <46751982+arpja@users.noreply.github.com> Co-authored-by: ShaniFelig <74960756+ShaniFelig@users.noreply.github.com> Co-authored-by: Pan Li Co-authored-by: Zach Rathbun Co-authored-by: surashed <55134940+surashed@users.noreply.github.com> Co-authored-by: Kaihui (Kerwin) Sun Co-authored-by: Zhenglai Zhang Co-authored-by: om-nishant <50401171+om-nishant@users.noreply.github.com> Co-authored-by: Ihar Voitka Co-authored-by: Ruoxuan Wang <52271048+ruowan@users.noreply.github.com> Co-authored-by: Ju Hee Lee Co-authored-by: xiazhan Co-authored-by: kai ru <69238381+kairu-ms@users.noreply.github.com> Co-authored-by: Ji Wang Co-authored-by: Andy Zhang Co-authored-by: guy-microsoft <50947884+guy-microsoft@users.noreply.github.com> Co-authored-by: PoAn (Baron) Chen Co-authored-by: Arcturus Co-authored-by: suyash691 Co-authored-by: nemijato <68876730+nemijato@users.noreply.github.com> Co-authored-by: brpanask <64860651+brpanask@users.noreply.github.com> Co-authored-by: Ray Chen Co-authored-by: Eli Arbel Co-authored-by: David Han <76010854+david-msft@users.noreply.github.com> Co-authored-by: Roman Khotsyn Co-authored-by: David R. Williamson Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Xinyi Joffre Co-authored-by: roytan-microsoft <73565668+roytan-microsoft@users.noreply.github.com> Co-authored-by: Vitaliy Fedonkin Co-authored-by: Samir Solanki Co-authored-by: maksimkim Co-authored-by: promoisha Co-authored-by: REDMOND\glfeokti Co-authored-by: RupengLiu Co-authored-by: vfedonkin Co-authored-by: David Čepelík Co-authored-by: David Čepelík Co-authored-by: mudit794 <42189950+mudit794@users.noreply.github.com> Co-authored-by: Dhawal Jain <41853104+dhawal777@users.noreply.github.com> Co-authored-by: MichalHel <51286657+MichalHel@users.noreply.github.com> Co-authored-by: Liran Chen Co-authored-by: jochav <75458295+jochav@users.noreply.github.com> Co-authored-by: Jorge Chavez Nieto Co-authored-by: rikogeln <40666347+rikogeln@users.noreply.github.com> Co-authored-by: chgennar <56695749+chgennar@users.noreply.github.com> Co-authored-by: hivyas <61890270+hivyas@users.noreply.github.com> Co-authored-by: Douglas Lee <65295939+leedouglas@users.noreply.github.com> Co-authored-by: Cameron Taggart Co-authored-by: LingyunSu <33764806+LingyunSu@users.noreply.github.com> Co-authored-by: elabicha <61994320+elabicha@users.noreply.github.com> Co-authored-by: Nikhil Kumar Mengani <62704762+nimengan@users.noreply.github.com> Co-authored-by: Junbo Wang Co-authored-by: Daniel Orozco <64658732+dagoroz@users.noreply.github.com> Co-authored-by: Adam Sandor Co-authored-by: yashmuel <63585146+yashmuel@users.noreply.github.com> --- .../azure/mgmt/managementpartner/__init__.py | 7 +- ...ce_provisioning_management_partner_api.py} | 37 +--- .../mgmt/managementpartner/_configuration.py | 43 ++++ .../mgmt/managementpartner/models/__init__.py | 26 +-- .../mgmt/managementpartner/models/_models.py | 192 ++++++++++++++++++ .../managementpartner/models/_models_py3.py | 192 ++++++++++++++++++ ...ion_response_paged.py => _paged_models.py} | 0 .../mgmt/managementpartner/models/error.py | 41 ---- .../managementpartner/models/error_py3.py | 41 ---- .../models/extended_error_info.py | 33 --- .../models/extended_error_info_py3.py | 33 --- .../models/operation_display.py | 40 ---- .../models/operation_display_py3.py | 40 ---- .../models/operation_response.py | 36 ---- .../models/operation_response_py3.py | 36 ---- .../models/partner_response.py | 82 -------- .../models/partner_response_py3.py | 82 -------- .../managementpartner/operations/__init__.py | 6 +- ...operations.py => _operation_operations.py} | 16 +- ...r_operations.py => _partner_operations.py} | 5 +- ..._operations.py => _partners_operations.py} | 3 +- 21 files changed, 466 insertions(+), 525 deletions(-) rename sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/{ace_provisioning_management_partner_api.py => _ace_provisioning_management_partner_api.py} (64%) create mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_configuration.py create mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_models.py create mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_models_py3.py rename sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/{operation_response_paged.py => _paged_models.py} (100%) delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/error.py delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/error_py3.py delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/extended_error_info.py delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/extended_error_info_py3.py delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_display.py delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_display_py3.py delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response.py delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response_py3.py delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/partner_response.py delete mode 100644 sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/partner_response_py3.py rename sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/{operation_operations.py => _operation_operations.py} (90%) rename sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/{partner_operations.py => _partner_operations.py} (98%) rename sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/{partners_operations.py => _partners_operations.py} (96%) diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/__init__.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/__init__.py index 90af592e5a75..fa3f6192b202 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/__init__.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/__init__.py @@ -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 diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/ace_provisioning_management_partner_api.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_ace_provisioning_management_partner_api.py similarity index 64% rename from sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/ace_provisioning_management_partner_api.py rename to sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_ace_provisioning_management_partner_api.py index d41c0eed23d0..03aa31eaf453 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/ace_provisioning_management_partner_api.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_ace_provisioning_management_partner_api.py @@ -11,39 +11,12 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.partner_operations import PartnerOperations -from .operations.operation_operations import OperationOperations -from .operations.partners_operations import PartnersOperations -from . import models - - -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` - :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) - - self.add_user_agent('azure-mgmt-managementpartner/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials +from ._configuration import ACEProvisioningManagementPartnerAPIConfiguration +from .operations import PartnerOperations +from .operations import OperationOperations +from .operations import PartnersOperations +from . import models class ACEProvisioningManagementPartnerAPI(SDKClient): diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_configuration.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_configuration.py new file mode 100644 index 000000000000..27ab40113cd5 --- /dev/null +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_configuration.py @@ -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` + :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 diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/__init__.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/__init__.py index c7f8243cb11e..7db0405a4d8d 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/__init__.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/__init__.py @@ -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', ] diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_models.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_models.py new file mode 100644 index 000000000000..2288cd81b156 --- /dev/null +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_models.py @@ -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 diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_models_py3.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_models_py3.py new file mode 100644 index 000000000000..76128518c662 --- /dev/null +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_models_py3.py @@ -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, *, error=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.error = error + + +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, *, code=None, message: str=None, **kwargs) -> None: + super(ExtendedErrorInfo, self).__init__(**kwargs) + self.code = code + self.message = message + + +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, *, 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 + + +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, *, name: str=None, display=None, origin: str=None, **kwargs) -> None: + super(OperationResponse, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + + +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, *, etag: int=None, partner_id: str=None, partner_name: str=None, tenant_id: str=None, object_id: str=None, version: int=None, updated_time=None, created_time=None, state=None, **kwargs) -> None: + super(PartnerResponse, self).__init__(**kwargs) + self.etag = etag + self.id = None + self.name = None + self.partner_id = partner_id + self.partner_name = partner_name + self.tenant_id = tenant_id + self.object_id = object_id + self.version = version + self.updated_time = updated_time + self.created_time = created_time + self.state = state + self.type = None diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response_paged.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_paged_models.py similarity index 100% rename from sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response_paged.py rename to sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_paged_models.py diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/error.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/error.py deleted file mode 100644 index b63843832f6b..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/error.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 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) diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/error_py3.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/error_py3.py deleted file mode 100644 index 2dfbf03e2e5e..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/error_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 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, *, error=None, **kwargs) -> None: - super(Error, self).__init__(**kwargs) - self.error = error - - -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) diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/extended_error_info.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/extended_error_info.py deleted file mode 100644 index dffd4e6c3038..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/extended_error_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 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) diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/extended_error_info_py3.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/extended_error_info_py3.py deleted file mode 100644 index 6d3289db3d26..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/extended_error_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 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, *, code=None, message: str=None, **kwargs) -> None: - super(ExtendedErrorInfo, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_display.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_display.py deleted file mode 100644 index 83b545485f0f..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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): - """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) diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_display_py3.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_display_py3.py deleted file mode 100644 index e747893666a4..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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): - """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, *, 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 diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response.py deleted file mode 100644 index ef55175250a8..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 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) diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response_py3.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response_py3.py deleted file mode 100644 index 181384a984ab..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/operation_response_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 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, *, name: str=None, display=None, origin: str=None, **kwargs) -> None: - super(OperationResponse, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/partner_response.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/partner_response.py deleted file mode 100644 index d1f5ba16b7eb..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/partner_response.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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 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: str - :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': 'str'}, - '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 diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/partner_response_py3.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/partner_response_py3.py deleted file mode 100644 index 685bcde706ba..000000000000 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/partner_response_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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 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: str - :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': 'str'}, - '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, *, etag: int=None, partner_id: str=None, partner_name: str=None, tenant_id: str=None, object_id: str=None, version: str=None, updated_time=None, created_time=None, state=None, **kwargs) -> None: - super(PartnerResponse, self).__init__(**kwargs) - self.etag = etag - self.id = None - self.name = None - self.partner_id = partner_id - self.partner_name = partner_name - self.tenant_id = tenant_id - self.object_id = object_id - self.version = version - self.updated_time = updated_time - self.created_time = created_time - self.state = state - self.type = None diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/__init__.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/__init__.py index a109cec82944..99fff5f011a0 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/__init__.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/__init__.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- -from .partner_operations import PartnerOperations -from .operation_operations import OperationOperations -from .partners_operations import PartnersOperations +from ._partner_operations import PartnerOperations +from ._operation_operations import OperationOperations +from ._partners_operations import PartnersOperations __all__ = [ 'PartnerOperations', diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/operation_operations.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_operation_operations.py similarity index 90% rename from sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/operation_operations.py rename to sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_operation_operations.py index 8bcb1f8b1af7..e3fc9f302cbd 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/operation_operations.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_operation_operations.py @@ -18,6 +18,8 @@ class OperationOperations(object): """OperationOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,8 +55,7 @@ def list( :raises: :class:`ErrorException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -79,6 +80,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationResponsePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.ManagementPartner/operations'} diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/partner_operations.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_partner_operations.py similarity index 98% rename from sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/partner_operations.py rename to sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_partner_operations.py index 4fec0fba7b28..2ae04d345215 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/partner_operations.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_partner_operations.py @@ -18,6 +18,8 @@ class PartnerOperations(object): """PartnerOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -84,7 +86,6 @@ def get( raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PartnerResponse', response) @@ -143,7 +144,6 @@ def create( raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PartnerResponse', response) @@ -202,7 +202,6 @@ def update( raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PartnerResponse', response) diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/partners_operations.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_partners_operations.py similarity index 96% rename from sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/partners_operations.py rename to sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_partners_operations.py index bd9af1ce622d..7df28fb30af8 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/partners_operations.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_partners_operations.py @@ -18,6 +18,8 @@ class PartnersOperations(object): """PartnersOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -78,7 +80,6 @@ def get( raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PartnerResponse', response)