Skip to content

Commit

Permalink
CodeGen from PR 17920 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Healthcareapis microsoft.healthcare apis 2022 01 31 preview (Azure#17920)

* Adds base for updating Microsoft.HealthcareApis from version preview/2021-06-01-preview to version 2021-11-01

* Updates readme

* Updates API version in new specs and examples

* Initial updates for 2021-11-01 version

* Fix prettier errors and resolve systemData error

* Add missing type definitions

* Remove pattern for validating Cors Origin.  Regex was found to have DDoS issues.  New correct pattern triggeres backwards breaking change alerts.  Removing patterns in latest iteration to avoid error.  Regexes are validated service side with updated logic already.

* Add missing endtime from OperationResult

* Revert CorsOriginEntry pattern removal to avoid false positive cross version breaking change

* Add definition for Properties property in operation definition that was missing.

* Test updating default verison per recommendation

* Update services and workspaces to use some provisioning state to remove .NET SDK error

* Resolve System.InvalidOperationException: Swagger document contains two or more x-ms-enum extensions with the same name 'ManagedServiceIdentityType' and different values: SystemAssigned,None vs. None,SystemAssigned,UserAssigned,SystemAssigned,UserAssigned

* Revert "Resolve System.InvalidOperationException: Swagger document contains two or more x-ms-enum extensions with the same name 'ManagedServiceIdentityType' and different values: SystemAssigned,None vs. None,SystemAssigned,UserAssigned,SystemAssigned,UserAssigned"

This reverts commit d44373c296808b50764b648279c60590a104a4b8.

* Resolve System.InvalidOperationException: Swagger document contains two or more x-ms-enum extensions with the same name 'ManagedServiceIdentityType' and different values: SystemAssigned,None vs. None,SystemAssigned,UserAssigned,SystemAssigned,UserAssigned"

* Change default back to 2021-01-11 version

* Change default version back in 2021-11-01 in anticipation of new release

* Revert changes that removed common-type references for local references

* Add async headers to patch examples

* Add managed identity settings to dicomservices

* Add resourceVersionPolicyCOnfiguration to workspaces/fhirservices

* Fix prettier errors

* Add missing description for resourceTypeOverrides

* Add missing  "x-ms-identifiers" property for arrays.

* add preview version 2021-11-01

* add api version 2022-01-31-preview

* fix path

* trigger GitHub actions

* fix path

Co-authored-by: Dustin Burson <47367432+dustinburson@users.noreply.github.com>
Co-authored-by: Dustin Burson <duburson@microsoft.com>
  • Loading branch information
3 people committed Apr 22, 2022
1 parent 7d577fa commit 0d4ad78
Show file tree
Hide file tree
Showing 35 changed files with 1,786 additions and 993 deletions.
6 changes: 3 additions & 3 deletions sdk/healthcareapis/azure-mgmt-healthcareapis/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.12.0",
"@autorest/python@5.13.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "a70086b6711c1058aaf3c5906744a665a492a504",
"commit": "8f67d564e191f0811dd24c81d21d11491798032f",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/healthcareapis/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"autorest_command": "autorest specification/healthcareapis/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/healthcareapis/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials import TokenCredential


class HealthcareApisManagementClientConfiguration(Configuration):
class HealthcareApisManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for HealthcareApisManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,6 +29,9 @@ class HealthcareApisManagementClientConfiguration(Configuration):
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The subscription identifier.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-01-31-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
Expand All @@ -38,14 +41,16 @@ def __init__(
**kwargs: Any
) -> None:
super(HealthcareApisManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-01-31-preview") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-11-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-healthcareapis/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Optional, TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from msrest import Deserializer, Serializer

from . import models
from ._configuration import HealthcareApisManagementClientConfiguration
Expand All @@ -21,7 +22,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

class HealthcareApisManagementClient:
class HealthcareApisManagementClient: # pylint: disable=too-many-instance-attributes
"""Azure Healthcare APIs Client.
:ivar services: ServicesOperations operations
Expand Down Expand Up @@ -60,8 +61,11 @@ class HealthcareApisManagementClient:
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The subscription identifier.
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-01-31-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
Expand Down Expand Up @@ -97,7 +101,7 @@ def __init__(

def _send_request(
self,
request, # type: HttpRequest
request: HttpRequest,
**kwargs: Any
) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2021-11-01",
"total_api_version_list": ["2021-11-01"],
"chosen_version": "2022-01-31-preview",
"total_api_version_list": ["2022-01-31-preview"],
"client": {
"name": "HealthcareApisManagementClient",
"filename": "_healthcare_apis_management_client",
Expand All @@ -10,8 +10,8 @@
"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\": [\"HealthcareApisManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"HealthcareApisManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"HealthcareApisManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"HealthcareApisManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down
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 = "1.1.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials_async import AsyncTokenCredential


class HealthcareApisManagementClientConfiguration(Configuration):
class HealthcareApisManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for HealthcareApisManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,6 +29,9 @@ class HealthcareApisManagementClientConfiguration(Configuration):
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The subscription identifier.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-01-31-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
Expand All @@ -38,14 +41,16 @@ def __init__(
**kwargs: Any
) -> None:
super(HealthcareApisManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-01-31-preview") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-11-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-healthcareapis/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Awaitable, Optional, TYPE_CHECKING
from typing import Any, Awaitable, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

from .. import models
from ._configuration import HealthcareApisManagementClientConfiguration
Expand All @@ -21,7 +22,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

class HealthcareApisManagementClient:
class HealthcareApisManagementClient: # pylint: disable=too-many-instance-attributes
"""Azure Healthcare APIs Client.
:ivar services: ServicesOperations operations
Expand Down Expand Up @@ -60,8 +61,11 @@ class HealthcareApisManagementClient:
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The subscription identifier.
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-01-31-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
Expand Down
Loading

0 comments on commit 0d4ad78

Please sign in to comment.