diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/__init__.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/__init__.py new file mode 100644 index 000000000000..5960c353a898 --- /dev/null +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/__init__.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/__init__.py new file mode 100644 index 000000000000..5960c353a898 --- /dev/null +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/__init__.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/__init__.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/__init__.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/__init__.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_configuration.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/_configuration.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_configuration.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/_configuration.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_confluent_management_client.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/_confluent_management_client.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_confluent_management_client.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/_confluent_management_client.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_metadata.json b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/_metadata.json similarity index 83% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_metadata.json rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/_metadata.json index a27d55bc7141..1fc1fa30779f 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_metadata.json +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/_metadata.json @@ -8,32 +8,33 @@ "base_url": "\u0027https://management.azure.com\u0027", "custom_base_url": null, "azure_arm": true, - "has_lro_operations": true + "has_lro_operations": true, + "client_side_validation": true }, "global_parameters": { - "sync_method": { + "sync": { "credential": { - "method_signature": "credential, # type: \"TokenCredential\"", + "signature": "credential, # type: \"TokenCredential\"", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials.TokenCredential", "required": true }, "subscription_id": { - "method_signature": "subscription_id, # type: str", + "signature": "subscription_id, # type: str", "description": "Microsoft Azure subscription id.", "docstring_type": "str", "required": true } }, - "async_method": { + "async": { "credential": { - "method_signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential, # type: \"AsyncTokenCredential\"", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "method_signature": "subscription_id, # type: str", + "signature": "subscription_id, # type: str", "description": "Microsoft Azure subscription id.", "docstring_type": "str", "required": true diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_version.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/_version.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_version.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/_version.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/__init__.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/__init__.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/__init__.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/__init__.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/_configuration.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/_configuration.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/_configuration.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/_configuration.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/_confluent_management_client.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/_confluent_management_client.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/_confluent_management_client.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/_confluent_management_client.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/__init__.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/__init__.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/__init__.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/__init__.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_marketplace_agreements_operations.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/_marketplace_agreements_operations.py similarity index 88% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_marketplace_agreements_operations.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/_marketplace_agreements_operations.py index 8f2c97502a6f..3b5ab906cd01 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_marketplace_agreements_operations.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/_marketplace_agreements_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -33,7 +33,7 @@ class MarketplaceAgreementsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, **kwargs - ) -> AsyncIterable["models.ConfluentAgreementResourceListResponse"]: + ) -> AsyncIterable["_models.ConfluentAgreementResourceListResponse"]: """List Confluent marketplace agreements in the subscription. List Confluent marketplace agreements in the subscription. @@ -54,7 +54,7 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.confluent.models.ConfluentAgreementResourceListResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfluentAgreementResourceListResponse"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfluentAgreementResourceListResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -97,7 +97,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -110,27 +110,25 @@ async def get_next(next_link=None): async def create( self, - properties: Optional["models.ConfluentAgreementProperties"] = None, + body: Optional["_models.ConfluentAgreementResource"] = None, **kwargs - ) -> "models.ConfluentAgreementResource": + ) -> "_models.ConfluentAgreementResource": """Create Confluent Marketplace agreement in the subscription. Create Confluent Marketplace agreement in the subscription. - :param properties: Represents the properties of the resource. - :type properties: ~azure.mgmt.confluent.models.ConfluentAgreementProperties + :param body: + :type body: ~azure.mgmt.confluent.models.ConfluentAgreementResource :keyword callable cls: A custom type or function that will be passed the direct response :return: ConfluentAgreementResource, or the result of cls(response) :rtype: ~azure.mgmt.confluent.models.ConfluentAgreementResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfluentAgreementResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfluentAgreementResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _body = models.ConfluentAgreementResource(properties=properties) content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -150,8 +148,8 @@ async def create( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - if _body is not None: - body_content = self._serialize.body(_body, 'ConfluentAgreementResource') + if body is not None: + body_content = self._serialize.body(body, 'ConfluentAgreementResource') else: body_content = None body_content_kwargs['content'] = body_content @@ -161,7 +159,7 @@ async def create( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConfluentAgreementResource', pipeline_response) diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_organization_operations.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/_organization_operations.py similarity index 89% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_organization_operations.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/_organization_operations.py index 661e3a2620ae..d16074f933a6 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_organization_operations.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/_organization_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,7 +35,7 @@ class OrganizationOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_subscription( self, **kwargs - ) -> AsyncIterable["models.OrganizationResourceListResult"]: + ) -> AsyncIterable["_models.OrganizationResourceListResult"]: """List all organizations under the specified subscription. List all organizations under the specified subscription. @@ -56,7 +56,7 @@ def list_by_subscription( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.confluent.models.OrganizationResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -116,7 +116,7 @@ def list_by_resource_group( self, resource_group_name: str, **kwargs - ) -> AsyncIterable["models.OrganizationResourceListResult"]: + ) -> AsyncIterable["_models.OrganizationResourceListResult"]: """List all Organizations under the specified resource group. List all Organizations under the specified resource group. @@ -128,7 +128,7 @@ def list_by_resource_group( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.confluent.models.OrganizationResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -174,7 +174,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -190,7 +190,7 @@ async def get( resource_group_name: str, organization_name: str, **kwargs - ) -> "models.OrganizationResource": + ) -> "_models.OrganizationResource": """Get the properties of a specific Organization resource. Get the properties of a specific Organization resource. @@ -204,7 +204,7 @@ async def get( :rtype: ~azure.mgmt.confluent.models.OrganizationResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -235,7 +235,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.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OrganizationResource', pipeline_response) @@ -250,10 +250,10 @@ async def _create_initial( self, resource_group_name: str, organization_name: str, - body: Optional["models.OrganizationResource"] = None, + body: Optional["_models.OrganizationResource"] = None, **kwargs - ) -> "models.OrganizationResource": - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResource"] + ) -> "_models.OrganizationResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -292,7 +292,7 @@ async def _create_initial( 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.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -311,9 +311,9 @@ async def begin_create( self, resource_group_name: str, organization_name: str, - body: Optional["models.OrganizationResource"] = None, + body: Optional["_models.OrganizationResource"] = None, **kwargs - ) -> AsyncLROPoller["models.OrganizationResource"]: + ) -> AsyncLROPoller["_models.OrganizationResource"]: """Create Organization resource. Create Organization resource. @@ -335,7 +335,7 @@ async def begin_create( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResource"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -360,7 +360,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'organizationName': self._serialize.url("organization_name", organization_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -378,9 +384,9 @@ async def update( self, resource_group_name: str, organization_name: str, - tags: Optional[Dict[str, str]] = None, + body: Optional["_models.OrganizationResourceUpdate"] = None, **kwargs - ) -> "models.OrganizationResource": + ) -> "_models.OrganizationResource": """Update Organization resource. Update Organization resource. @@ -389,20 +395,18 @@ async def update( :type resource_group_name: str :param organization_name: Organization resource name. :type organization_name: str - :param tags: ARM resource tags. - :type tags: dict[str, str] + :param body: Updated Organization resource. + :type body: ~azure.mgmt.confluent.models.OrganizationResourceUpdate :keyword callable cls: A custom type or function that will be passed the direct response :return: OrganizationResource, or the result of cls(response) :rtype: ~azure.mgmt.confluent.models.OrganizationResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _body = models.OrganizationResourceUpdate(tags=tags) api_version = "2020-03-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -426,8 +430,8 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - if _body is not None: - body_content = self._serialize.body(_body, 'OrganizationResourceUpdate') + if body is not None: + body_content = self._serialize.body(body, 'OrganizationResourceUpdate') else: body_content = None body_content_kwargs['content'] = body_content @@ -437,7 +441,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.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OrganizationResource', pipeline_response) @@ -485,7 +489,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -539,7 +543,13 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'organizationName': self._serialize.url("organization_name", organization_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_organization_operations_operations.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/_organization_operations_operations.py similarity index 93% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_organization_operations_operations.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/_organization_operations_operations.py index fb4dc45eca46..d8f4fadcefc7 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_organization_operations_operations.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/aio/operations/_organization_operations_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -33,7 +33,7 @@ class OrganizationOperationsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, **kwargs - ) -> AsyncIterable["models.OperationListResult"]: + ) -> AsyncIterable["_models.OperationListResult"]: """List all operations provided by Microsoft.Confluent. List all operations provided by Microsoft.Confluent. @@ -54,7 +54,7 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.confluent.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -95,7 +95,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/__init__.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/models/__init__.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/__init__.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/models/__init__.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_confluent_management_client_enums.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/models/_confluent_management_client_enums.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_confluent_management_client_enums.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/models/_confluent_management_client_enums.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_models.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/models/_models.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_models.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/models/_models.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_models_py3.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/models/_models_py3.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_models_py3.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/models/_models_py3.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/__init__.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/__init__.py similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/__init__.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/__init__.py diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_marketplace_agreements_operations.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/_marketplace_agreements_operations.py similarity index 87% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_marketplace_agreements_operations.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/_marketplace_agreements_operations.py index 76668b1eb270..72beadd15838 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_marketplace_agreements_operations.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/_marketplace_agreements_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -37,7 +37,7 @@ class MarketplaceAgreementsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,7 +49,7 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.ConfluentAgreementResourceListResponse"] + # type: (...) -> Iterable["_models.ConfluentAgreementResourceListResponse"] """List Confluent marketplace agreements in the subscription. List Confluent marketplace agreements in the subscription. @@ -59,7 +59,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.confluent.models.ConfluentAgreementResourceListResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfluentAgreementResourceListResponse"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfluentAgreementResourceListResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -102,7 +102,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -115,28 +115,26 @@ def get_next(next_link=None): def create( self, - properties=None, # type: Optional["models.ConfluentAgreementProperties"] + body=None, # type: Optional["_models.ConfluentAgreementResource"] **kwargs # type: Any ): - # type: (...) -> "models.ConfluentAgreementResource" + # type: (...) -> "_models.ConfluentAgreementResource" """Create Confluent Marketplace agreement in the subscription. Create Confluent Marketplace agreement in the subscription. - :param properties: Represents the properties of the resource. - :type properties: ~azure.mgmt.confluent.models.ConfluentAgreementProperties + :param body: + :type body: ~azure.mgmt.confluent.models.ConfluentAgreementResource :keyword callable cls: A custom type or function that will be passed the direct response :return: ConfluentAgreementResource, or the result of cls(response) :rtype: ~azure.mgmt.confluent.models.ConfluentAgreementResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfluentAgreementResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfluentAgreementResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _body = models.ConfluentAgreementResource(properties=properties) content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -156,8 +154,8 @@ def create( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - if _body is not None: - body_content = self._serialize.body(_body, 'ConfluentAgreementResource') + if body is not None: + body_content = self._serialize.body(body, 'ConfluentAgreementResource') else: body_content = None body_content_kwargs['content'] = body_content @@ -167,7 +165,7 @@ def create( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConfluentAgreementResource', pipeline_response) diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_organization_operations.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/_organization_operations.py similarity index 89% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_organization_operations.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/_organization_operations.py index 61993f309c71..71eeae4b50de 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_organization_operations.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/_organization_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -39,7 +39,7 @@ class OrganizationOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_subscription( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.OrganizationResourceListResult"] + # type: (...) -> Iterable["_models.OrganizationResourceListResult"] """List all organizations under the specified subscription. List all organizations under the specified subscription. @@ -61,7 +61,7 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.confluent.models.OrganizationResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -122,7 +122,7 @@ def list_by_resource_group( resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.OrganizationResourceListResult"] + # type: (...) -> Iterable["_models.OrganizationResourceListResult"] """List all Organizations under the specified resource group. List all Organizations under the specified resource group. @@ -134,7 +134,7 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.confluent.models.OrganizationResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -180,7 +180,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -197,7 +197,7 @@ def get( organization_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.OrganizationResource" + # type: (...) -> "_models.OrganizationResource" """Get the properties of a specific Organization resource. Get the properties of a specific Organization resource. @@ -211,7 +211,7 @@ def get( :rtype: ~azure.mgmt.confluent.models.OrganizationResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -242,7 +242,7 @@ 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.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OrganizationResource', pipeline_response) @@ -257,11 +257,11 @@ def _create_initial( self, resource_group_name, # type: str organization_name, # type: str - body=None, # type: Optional["models.OrganizationResource"] + body=None, # type: Optional["_models.OrganizationResource"] **kwargs # type: Any ): - # type: (...) -> "models.OrganizationResource" - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResource"] + # type: (...) -> "_models.OrganizationResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -300,7 +300,7 @@ def _create_initial( 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.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -319,10 +319,10 @@ def begin_create( self, resource_group_name, # type: str organization_name, # type: str - body=None, # type: Optional["models.OrganizationResource"] + body=None, # type: Optional["_models.OrganizationResource"] **kwargs # type: Any ): - # type: (...) -> LROPoller["models.OrganizationResource"] + # type: (...) -> LROPoller["_models.OrganizationResource"] """Create Organization resource. Create Organization resource. @@ -344,7 +344,7 @@ def begin_create( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResource"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -369,7 +369,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'organizationName': self._serialize.url("organization_name", organization_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -387,10 +393,10 @@ def update( self, resource_group_name, # type: str organization_name, # type: str - tags=None, # type: Optional[Dict[str, str]] + body=None, # type: Optional["_models.OrganizationResourceUpdate"] **kwargs # type: Any ): - # type: (...) -> "models.OrganizationResource" + # type: (...) -> "_models.OrganizationResource" """Update Organization resource. Update Organization resource. @@ -399,20 +405,18 @@ def update( :type resource_group_name: str :param organization_name: Organization resource name. :type organization_name: str - :param tags: ARM resource tags. - :type tags: dict[str, str] + :param body: Updated Organization resource. + :type body: ~azure.mgmt.confluent.models.OrganizationResourceUpdate :keyword callable cls: A custom type or function that will be passed the direct response :return: OrganizationResource, or the result of cls(response) :rtype: ~azure.mgmt.confluent.models.OrganizationResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OrganizationResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrganizationResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _body = models.OrganizationResourceUpdate(tags=tags) api_version = "2020-03-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -436,8 +440,8 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - if _body is not None: - body_content = self._serialize.body(_body, 'OrganizationResourceUpdate') + if body is not None: + body_content = self._serialize.body(body, 'OrganizationResourceUpdate') else: body_content = None body_content_kwargs['content'] = body_content @@ -447,7 +451,7 @@ 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.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OrganizationResource', pipeline_response) @@ -496,7 +500,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -551,7 +555,13 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'organizationName': self._serialize.url("organization_name", organization_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_organization_operations_operations.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/_organization_operations_operations.py similarity index 93% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_organization_operations_operations.py rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/_organization_operations_operations.py index fc16899213eb..8ee9de549e6c 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_organization_operations_operations.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/operations/_organization_operations_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -37,7 +37,7 @@ class OrganizationOperationsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,7 +49,7 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.OperationListResult"] + # type: (...) -> Iterable["_models.OperationListResult"] """List all operations provided by Microsoft.Confluent. List all operations provided by Microsoft.Confluent. @@ -59,7 +59,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.confluent.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -100,7 +100,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/py.typed b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/py.typed similarity index 100% rename from sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/py.typed rename to sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/azure/mgmt/confluent/py.typed