Skip to content

Commit

Permalink
CodeGen from PR 13903 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 46de85810a3f6c3c9c8950dc3622fc419058d923 into b357720
  • Loading branch information
SDKAuto committed Apr 13, 2021
1 parent 75c8874 commit 6f2ed9c
Show file tree
Hide file tree
Showing 154 changed files with 2,341 additions and 1,547 deletions.
1 change: 1 addition & 0 deletions sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/apimanagement/azure-mgmt-apimanagement/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "3.0.6369",
"use": "@autorest/python@5.6.2",
"commit": "3145790b02f5f291d8dcadba3dfb6c9a135b9145",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/apimanagement/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.2 --version=3.0.6369",
"readme": "specification/apimanagement/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-12-01"
self.api_version = "2021-01-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-apimanagement/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"chosen_version": "2021-01-01-preview",
"total_api_version_list": ["2021-01-01-preview"],
"client": {
"name": "ApiManagementClient",
"filename": "_api_management_client",
"description": "ApiManagement Client.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ApiManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ApiManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id: str,",
"description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url=None, # type: Optional[str]",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url: Optional[str] = None,",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null,
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"api": "ApiOperations",
"api_revision": "ApiRevisionOperations",
"api_release": "ApiReleaseOperations",
"api_operation": "ApiOperationOperations",
"api_operation_policy": "ApiOperationPolicyOperations",
"tag": "TagOperations",
"api_product": "ApiProductOperations",
"api_policy": "ApiPolicyOperations",
"api_schema": "ApiSchemaOperations",
"api_diagnostic": "ApiDiagnosticOperations",
"api_issue": "ApiIssueOperations",
"api_issue_comment": "ApiIssueCommentOperations",
"api_issue_attachment": "ApiIssueAttachmentOperations",
"api_tag_description": "ApiTagDescriptionOperations",
"operation": "OperationOperations",
"api_export": "ApiExportOperations",
"api_version_set": "ApiVersionSetOperations",
"authorization_server": "AuthorizationServerOperations",
"backend": "BackendOperations",
"cache": "CacheOperations",
"certificate": "CertificateOperations",
"content_type": "ContentTypeOperations",
"content_item": "ContentItemOperations",
"deleted_services": "DeletedServicesOperations",
"api_management_operations": "ApiManagementOperationsOperations",
"api_management_service_skus": "ApiManagementServiceSkusOperations",
"api_management_service": "ApiManagementServiceOperations",
"diagnostic": "DiagnosticOperations",
"email_template": "EmailTemplateOperations",
"gateway": "GatewayOperations",
"gateway_hostname_configuration": "GatewayHostnameConfigurationOperations",
"gateway_api": "GatewayApiOperations",
"gateway_certificate_authority": "GatewayCertificateAuthorityOperations",
"group": "GroupOperations",
"group_user": "GroupUserOperations",
"identity_provider": "IdentityProviderOperations",
"issue": "IssueOperations",
"logger": "LoggerOperations",
"named_value": "NamedValueOperations",
"network_status": "NetworkStatusOperations",
"notification": "NotificationOperations",
"notification_recipient_user": "NotificationRecipientUserOperations",
"notification_recipient_email": "NotificationRecipientEmailOperations",
"open_id_connect_provider": "OpenIdConnectProviderOperations",
"policy": "PolicyOperations",
"policy_description": "PolicyDescriptionOperations",
"portal_revision": "PortalRevisionOperations",
"portal_settings": "PortalSettingsOperations",
"sign_in_settings": "SignInSettingsOperations",
"sign_up_settings": "SignUpSettingsOperations",
"delegation_settings": "DelegationSettingsOperations",
"product": "ProductOperations",
"product_api": "ProductApiOperations",
"product_group": "ProductGroupOperations",
"product_subscriptions": "ProductSubscriptionsOperations",
"product_policy": "ProductPolicyOperations",
"quota_by_counter_keys": "QuotaByCounterKeysOperations",
"quota_by_period_keys": "QuotaByPeriodKeysOperations",
"region": "RegionOperations",
"reports": "ReportsOperations",
"tenant_settings": "TenantSettingsOperations",
"api_management_skus": "ApiManagementSkusOperations",
"subscription": "SubscriptionOperations",
"tag_resource": "TagResourceOperations",
"tenant_access": "TenantAccessOperations",
"tenant_access_git": "TenantAccessGitOperations",
"tenant_configuration": "TenantConfigurationOperations",
"user": "UserOperations",
"user_group": "UserGroupOperations",
"user_subscription": "UserSubscriptionOperations",
"user_identities": "UserIdentitiesOperations",
"user_confirmation_password": "UserConfirmationPasswordOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.0.0"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-12-01"
self.api_version = "2021-01-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-apimanagement/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def list_by_service(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-12-01"
api_version = "2021-01-01-preview"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -126,7 +126,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

Expand Down Expand Up @@ -166,7 +166,7 @@ async def get_entity_tag(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-12-01"
api_version = "2021-01-01-preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -194,7 +194,7 @@ async def get_entity_tag(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
Expand Down Expand Up @@ -235,7 +235,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-12-01"
api_version = "2021-01-01-preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -263,7 +263,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
Expand Down Expand Up @@ -312,7 +312,7 @@ async def create_or_update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-12-01"
api_version = "2021-01-01-preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -347,7 +347,7 @@ async def create_or_update(

if response.status_code not in [200, 201]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
Expand Down Expand Up @@ -401,7 +401,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-12-01"
api_version = "2021-01-01-preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -435,7 +435,7 @@ async def update(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
Expand Down Expand Up @@ -481,7 +481,7 @@ async def delete(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-12-01"
api_version = "2021-01-01-preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -510,7 +510,7 @@ async def delete(

if response.status_code not in [200, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if cls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-12-01"
api_version = "2021-01-01-preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -103,7 +103,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('ApiExportResult', pipeline_response)
Expand Down
Loading

0 comments on commit 6f2ed9c

Please sign in to comment.