text:
import sys
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse

from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
    ClientAuthenticationError,
    HttpResponseError,
    ResourceExistsError,
    ResourceNotFoundError,
    ResourceNotModifiedError,
    map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
from azure.core.rest import HttpRequest
from azure.core.tracing.decorator import distributed_trace
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._storage_accounts_operations import (
    build_check_name_availability_request,
    build_create_request,
    build_delete_request,
    build_get_properties_request,
    build_list_account_sas_request,
    build_list_by_resource_group_request,
    build_list_keys_request,
    build_list_request,
    build_list_service_sas_request,
    build_regenerate_key_request,
    build_update_request,
)

if sys.version_info >= (3, 8):
    from typing import Literal  # pylint: disable=no-name-in-module, ungrouped-imports
else:
    from typing_extensions import Literal  # type: ignore  # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

class StorageAccountsOperations:
    """
    .. warning::
        **DO NOT** instantiate this class directly.

        Instead, you should access the following operations through
        :class:`~azure.mgmt.storage.v2016_12_01.aio.StorageManagement`'s
        :attr:`storage_accounts` attribute.
    """

    models = _models

    def __init__(self, *args, **kwargs) -> None:
        input_args = list(args)
        self._client = input_args.pop(0) if input_args else kwargs.pop("client")
        self._config = input_args.pop(0) if input_args else kwargs.pop("config")
        self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
        self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")

    @overload
    async def check_name_availability(
        self,
        account_name: _models.StorageAccountCheckNameAvailabilityParameters,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> _models.CheckNameAvailabilityResult:
        """Checks that the storage account name is valid and is not already in use.

        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name:
         ~azure.mgmt.storage.v2016_12_01.models.StorageAccountCheckNameAvailabilityParameters
        :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: CheckNameAvailabilityResult or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.CheckNameAvailabilityResult
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @overload
    async def check_name_availability(
        self, account_name: IO, *, content_type: str = "application/json", **kwargs: Any
    ) -> _models.CheckNameAvailabilityResult:
        """Checks that the storage account name is valid and is not already in use.

        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: IO
        :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: CheckNameAvailabilityResult or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.CheckNameAvailabilityResult
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @distributed_trace_async
    async def check_name_availability(
        self, account_name: Union[_models.StorageAccountCheckNameAvailabilityParameters, IO], **kwargs: Any
    ) -> _models.CheckNameAvailabilityResult:
        """Checks that the storage account name is valid and is not already in use.

        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Is either a model type or a IO type. Required.
        :type account_name:
         ~azure.mgmt.storage.v2016_12_01.models.StorageAccountCheckNameAvailabilityParameters or IO
        :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
         Default value is None.
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: CheckNameAvailabilityResult or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.CheckNameAvailabilityResult
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None))  # type: Optional[str]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.CheckNameAvailabilityResult]

        content_type = content_type or "application/json"
        _json = None
        _content = None
        if isinstance(account_name, (IO, bytes)):
            _content = account_name
        else:
            _json = self._serialize.body(account_name, "StorageAccountCheckNameAvailabilityParameters")

        request = build_check_name_availability_request(
            subscription_id=self._config.subscription_id,
            api_version=api_version,
            content_type=content_type,
            json=_json,
            content=_content,
            template_url=self.check_name_availability.metadata["url"],
            headers=_headers,
            params=_params,
        )
        request = _convert_request(request)
        request.url = self._client.format_url(request.url)  # type: ignore

        pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            request, stream=False, **kwargs
        )

        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)

        deserialized = self._deserialize("CheckNameAvailabilityResult", pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized

    check_name_availability.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability"}  # type: ignore

    async def _create_initial(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: Union[_models.StorageAccountCreateParameters, IO],
        **kwargs: Any
    ) -> Optional[_models.StorageAccount]:
        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None))  # type: Optional[str]
        cls = kwargs.pop("cls", None)  # type: ClsType[Optional[_models.StorageAccount]]

        content_type = content_type or "application/json"
        _json = None
        _content = None
        if isinstance(parameters, (IO, bytes)):
            _content = parameters
        else:
            _json = self._serialize.body(parameters, "StorageAccountCreateParameters")

        request = build_create_request(
            resource_group_name=resource_group_name,
            account_name=account_name,
            subscription_id=self._config.subscription_id,
            api_version=api_version,
            content_type=content_type,
            json=_json,
            content=_content,
            template_url=self._create_initial.metadata["url"],
            headers=_headers,
            params=_params,
        )
        request = _convert_request(request)
        request.url = self._client.format_url(request.url)  # type: ignore

        pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            request, stream=False, **kwargs
        )

        response = pipeline_response.http_response

        if response.status_code not in [200, 202]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)

        deserialized = None
        if response.status_code == 200:
            deserialized = self._deserialize("StorageAccount", pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized

    _create_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}"}  # type: ignore

    @overload
    async def begin_create(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: _models.StorageAccountCreateParameters,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> AsyncLROPoller[_models.StorageAccount]:
        """Asynchronously creates a new storage account with the specified parameters. If an account is
        already created and a subsequent create request is issued with different properties, the
        account properties will be updated. If an account is already created and a subsequent create or
        update request is issued with the exact same set of properties, the request will succeed.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide for the created account. Required.
        :type parameters: ~azure.mgmt.storage.v2016_12_01.models.StorageAccountCreateParameters
        :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :keyword str continuation_token: A continuation token to restart a poller from a saved state.
        :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
         this operation to not poll, or pass in your own initialized polling object for a personal
         polling strategy.
        :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
        :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
         Retry-After header is present.
        :return: An instance of AsyncLROPoller that returns either StorageAccount or the result of
         cls(response)
        :rtype:
         ~azure.core.polling.AsyncLROPoller[~azure.mgmt.storage.v2016_12_01.models.StorageAccount]
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @overload
    async def begin_create(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: IO,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> AsyncLROPoller[_models.StorageAccount]:
        """Asynchronously creates a new storage account with the specified parameters. If an account is
        already created and a subsequent create request is issued with different properties, the
        account properties will be updated. If an account is already created and a subsequent create or
        update request is issued with the exact same set of properties, the request will succeed.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide for the created account. Required.
        :type parameters: IO
        :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :keyword str continuation_token: A continuation token to restart a poller from a saved state.
        :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
         this operation to not poll, or pass in your own initialized polling object for a personal
         polling strategy.
        :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
        :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
         Retry-After header is present.
        :return: An instance of AsyncLROPoller that returns either StorageAccount or the result of
         cls(response)
        :rtype:
         ~azure.core.polling.AsyncLROPoller[~azure.mgmt.storage.v2016_12_01.models.StorageAccount]
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @distributed_trace_async
    async def begin_create(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: Union[_models.StorageAccountCreateParameters, IO],
        **kwargs: Any
    ) -> AsyncLROPoller[_models.StorageAccount]:
        """Asynchronously creates a new storage account with the specified parameters. If an account is
        already created and a subsequent create request is issued with different properties, the
        account properties will be updated. If an account is already created and a subsequent create or
        update request is issued with the exact same set of properties, the request will succeed.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide for the created account. Is either a model type or
         a IO type. Required.
        :type parameters: ~azure.mgmt.storage.v2016_12_01.models.StorageAccountCreateParameters or IO
        :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
         Default value is None.
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :keyword str continuation_token: A continuation token to restart a poller from a saved state.
        :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
         this operation to not poll, or pass in your own initialized polling object for a personal
         polling strategy.
        :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
        :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
         Retry-After header is present.
        :return: An instance of AsyncLROPoller that returns either StorageAccount or the result of
         cls(response)
        :rtype:
         ~azure.core.polling.AsyncLROPoller[~azure.mgmt.storage.v2016_12_01.models.StorageAccount]
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None))  # type: Optional[str]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.StorageAccount]
        polling = kwargs.pop("polling", True)  # type: Union[bool, AsyncPollingMethod]
        lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
        cont_token = kwargs.pop("continuation_token", None)  # type: Optional[str]
        if cont_token is None:
            raw_result = await self._create_initial(  # type: ignore
                resource_group_name=resource_group_name,
                account_name=account_name,
                parameters=parameters,
                api_version=api_version,
                content_type=content_type,
                cls=lambda x, y, z: x,
                headers=_headers,
                params=_params,
                **kwargs
            )
        kwargs.pop("error_map", None)

        def get_long_running_output(pipeline_response):
            deserialized = self._deserialize("StorageAccount", pipeline_response)
            if cls:
                return cls(pipeline_response, deserialized, {})
            return deserialized

        if polling is True:
            polling_method = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs))  # type: AsyncPollingMethod
        elif polling is False:
            polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
        else:
            polling_method = polling
        if cont_token:
            return AsyncLROPoller.from_continuation_token(
                polling_method=polling_method,
                continuation_token=cont_token,
                client=self._client,
                deserialization_callback=get_long_running_output,
            )
        return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)

    begin_create.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}"}  # type: ignore

    @distributed_trace_async
    async def delete(  # pylint: disable=inconsistent-return-statements
        self, resource_group_name: str, account_name: str, **kwargs: Any
    ) -> None:
        """Deletes a storage account in Microsoft Azure.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None or the result of cls(response)
        :rtype: None
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        _headers = kwargs.pop("headers", {}) or {}
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        cls = kwargs.pop("cls", None)  # type: ClsType[None]

        request = build_delete_request(
            resource_group_name=resource_group_name,
            account_name=account_name,
            subscription_id=self._config.subscription_id,
            api_version=api_version,
            template_url=self.delete.metadata["url"],
            headers=_headers,
            params=_params,
        )
        request = _convert_request(request)
        request.url = self._client.format_url(request.url)  # type: ignore

        pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            request, stream=False, **kwargs
        )

        response = pipeline_response.http_response

        if response.status_code not in [200, 204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}"}  # type: ignore

    @distributed_trace_async
    async def get_properties(
        self, resource_group_name: str, account_name: str, **kwargs: Any
    ) -> _models.StorageAccount:
        """Returns the properties for the specified storage account including but not limited to name, SKU
        name, location, and account status. The ListKeys operation should be used to retrieve storage
        keys.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: StorageAccount or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.StorageAccount
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        _headers = kwargs.pop("headers", {}) or {}
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.StorageAccount]

        request = build_get_properties_request(
            resource_group_name=resource_group_name,
            account_name=account_name,
            subscription_id=self._config.subscription_id,
            api_version=api_version,
            template_url=self.get_properties.metadata["url"],
            headers=_headers,
            params=_params,
        )
        request = _convert_request(request)
        request.url = self._client.format_url(request.url)  # type: ignore

        pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            request, stream=False, **kwargs
        )

        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)

        deserialized = self._deserialize("StorageAccount", pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized

    get_properties.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}"}  # type: ignore

    @overload
    async def update(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: _models.StorageAccountUpdateParameters,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> _models.StorageAccount:
        """The update operation can be used to update the SKU, encryption, access tier, or tags for a
        storage account. It can also be used to map the account to a custom domain. Only one custom
        domain is supported per storage account; the replacement/change of custom domain is not
        supported. In order to replace an old custom domain, the old value must be cleared/unregistered
        before a new value can be set. The update of multiple properties is supported. This call does
        not change the storage keys for the account. If you want to change the storage account keys,
        use the regenerate keys operation. The location and name of the storage account cannot be
        changed after creation.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide for the updated account. Required.
        :type parameters: ~azure.mgmt.storage.v2016_12_01.models.StorageAccountUpdateParameters
        :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: StorageAccount or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.StorageAccount
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @overload
    async def update(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: IO,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> _models.StorageAccount:
        """The update operation can be used to update the SKU, encryption, access tier, or tags for a
        storage account. It can also be used to map the account to a custom domain. Only one custom
        domain is supported per storage account; the replacement/change of custom domain is not
        supported. In order to replace an old custom domain, the old value must be cleared/unregistered
        before a new value can be set. The update of multiple properties is supported. This call does
        not change the storage keys for the account. If you want to change the storage account keys,
        use the regenerate keys operation. The location and name of the storage account cannot be
        changed after creation.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide for the updated account. Required.
        :type parameters: IO
        :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: StorageAccount or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.StorageAccount
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @distributed_trace_async
    async def update(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: Union[_models.StorageAccountUpdateParameters, IO],
        **kwargs: Any
    ) -> _models.StorageAccount:
        """The update operation can be used to update the SKU, encryption, access tier, or tags for a
        storage account. It can also be used to map the account to a custom domain. Only one custom
        domain is supported per storage account; the replacement/change of custom domain is not
        supported. In order to replace an old custom domain, the old value must be cleared/unregistered
        before a new value can be set. The update of multiple properties is supported. This call does
        not change the storage keys for the account. If you want to change the storage account keys,
        use the regenerate keys operation. The location and name of the storage account cannot be
        changed after creation.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide for the updated account. Is either a model type or
         a IO type. Required.
        :type parameters: ~azure.mgmt.storage.v2016_12_01.models.StorageAccountUpdateParameters or IO
        :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
         Default value is None.
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: StorageAccount or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.StorageAccount
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None))  # type: Optional[str]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.StorageAccount]

        content_type = content_type or "application/json"
        _json = None
        _content = None
        if isinstance(parameters, (IO, bytes)):
            _content = parameters
        else:
            _json = self._serialize.body(parameters, "StorageAccountUpdateParameters")

        request = build_update_request(
            resource_group_name=resource_group_name,
            account_name=account_name,
            subscription_id=self._config.subscription_id,
            api_version=api_version,
            content_type=content_type,
            json=_json,
            content=_content,
            template_url=self.update.metadata["url"],
            headers=_headers,
            params=_params,
        )
        request = _convert_request(request)
        request.url = self._client.format_url(request.url)  # type: ignore

        pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            request, stream=False, **kwargs
        )

        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)

        deserialized = self._deserialize("StorageAccount", pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized

    update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}"}  # type: ignore

    @distributed_trace
    def list(self, **kwargs: Any) -> AsyncIterable["_models.StorageAccount"]:
        """Lists all the storage accounts available under the subscription. Note that storage keys are not
        returned; use the ListKeys operation for this.

        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either StorageAccount or the result of cls(response)
        :rtype:
         ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2016_12_01.models.StorageAccount]
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        _headers = kwargs.pop("headers", {}) or {}
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.StorageAccountListResult]

        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        def prepare_request(next_link=None):
            if not next_link:

                request = build_list_request(
                    subscription_id=self._config.subscription_id,
                    api_version=api_version,
                    template_url=self.list.metadata["url"],
                    headers=_headers,
                    params=_params,
                )
                request = _convert_request(request)
                request.url = self._client.format_url(request.url)  # type: ignore

            else:
                # make call to next link with the client's api-version
                _parsed_next_link = urllib.parse.urlparse(next_link)
                _next_request_params = case_insensitive_dict(
                    {
                        key: [urllib.parse.quote(v) for v in value]
                        for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
                    }
                )
                _next_request_params["api-version"] = self._config.api_version
                request = HttpRequest(
                    "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
                )
                request = _convert_request(request)
                request.url = self._client.format_url(request.url)  # type: ignore
                request.method = "GET"
            return request

        async def extract_data(pipeline_response):
            deserialized = self._deserialize("StorageAccountListResult", pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return None, AsyncList(list_of_elem)

        async def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
                request, stream=False, **kwargs
            )
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, error_format=ARMErrorFormat)

            return pipeline_response

        return AsyncItemPaged(get_next, extract_data)

    list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts"}  # type: ignore

    @distributed_trace
    def list_by_resource_group(
        self, resource_group_name: str, **kwargs: Any
    ) -> AsyncIterable["_models.StorageAccount"]:
        """Lists all the storage accounts available under the given resource group. Note that storage keys
        are not returned; use the ListKeys operation for this.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either StorageAccount or the result of cls(response)
        :rtype:
         ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2016_12_01.models.StorageAccount]
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        _headers = kwargs.pop("headers", {}) or {}
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.StorageAccountListResult]

        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        def prepare_request(next_link=None):
            if not next_link:

                request = build_list_by_resource_group_request(
                    resource_group_name=resource_group_name,
                    subscription_id=self._config.subscription_id,
                    api_version=api_version,
                    template_url=self.list_by_resource_group.metadata["url"],
                    headers=_headers,
                    params=_params,
                )
                request = _convert_request(request)
                request.url = self._client.format_url(request.url)  # type: ignore

            else:
                # make call to next link with the client's api-version
                _parsed_next_link = urllib.parse.urlparse(next_link)
                _next_request_params = case_insensitive_dict(
                    {
                        key: [urllib.parse.quote(v) for v in value]
                        for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
                    }
                )
                _next_request_params["api-version"] = self._config.api_version
                request = HttpRequest(
                    "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
                )
                request = _convert_request(request)
                request.url = self._client.format_url(request.url)  # type: ignore
                request.method = "GET"
            return request

        async def extract_data(pipeline_response):
            deserialized = self._deserialize("StorageAccountListResult", pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return None, AsyncList(list_of_elem)

        async def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
                request, stream=False, **kwargs
            )
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, error_format=ARMErrorFormat)

            return pipeline_response

        return AsyncItemPaged(get_next, extract_data)

    list_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts"}  # type: ignore

    @distributed_trace_async
    async def list_keys(
        self, resource_group_name: str, account_name: str, **kwargs: Any
    ) -> _models.StorageAccountListKeysResult:
        """Lists the access keys for the specified storage account.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: StorageAccountListKeysResult or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.StorageAccountListKeysResult
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        _headers = kwargs.pop("headers", {}) or {}
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.StorageAccountListKeysResult]

        request = build_list_keys_request(
            resource_group_name=resource_group_name,
            account_name=account_name,
            subscription_id=self._config.subscription_id,
            api_version=api_version,
            template_url=self.list_keys.metadata["url"],
            headers=_headers,
            params=_params,
        )
        request = _convert_request(request)
        request.url = self._client.format_url(request.url)  # type: ignore

        pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            request, stream=False, **kwargs
        )

        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)

        deserialized = self._deserialize("StorageAccountListKeysResult", pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized

    list_keys.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys"}  # type: ignore

    @overload
    async def regenerate_key(
        self,
        resource_group_name: str,
        account_name: str,
        regenerate_key: _models.StorageAccountRegenerateKeyParameters,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> _models.StorageAccountListKeysResult:
        """Regenerates one of the access keys for the specified storage account.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param regenerate_key: Specifies name of the key which should be regenerated -- key1 or key2.
         Required.
        :type regenerate_key:
         ~azure.mgmt.storage.v2016_12_01.models.StorageAccountRegenerateKeyParameters
        :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: StorageAccountListKeysResult or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.StorageAccountListKeysResult
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @overload
    async def regenerate_key(
        self,
        resource_group_name: str,
        account_name: str,
        regenerate_key: IO,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> _models.StorageAccountListKeysResult:
        """Regenerates one of the access keys for the specified storage account.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param regenerate_key: Specifies name of the key which should be regenerated -- key1 or key2.
         Required.
        :type regenerate_key: IO
        :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: StorageAccountListKeysResult or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.StorageAccountListKeysResult
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @distributed_trace_async
    async def regenerate_key(
        self,
        resource_group_name: str,
        account_name: str,
        regenerate_key: Union[_models.StorageAccountRegenerateKeyParameters, IO],
        **kwargs: Any
    ) -> _models.StorageAccountListKeysResult:
        """Regenerates one of the access keys for the specified storage account.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param regenerate_key: Specifies name of the key which should be regenerated -- key1 or key2.
         Is either a model type or a IO type. Required.
        :type regenerate_key:
         ~azure.mgmt.storage.v2016_12_01.models.StorageAccountRegenerateKeyParameters or IO
        :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
         Default value is None.
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: StorageAccountListKeysResult or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.StorageAccountListKeysResult
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None))  # type: Optional[str]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.StorageAccountListKeysResult]

        content_type = content_type or "application/json"
        _json = None
        _content = None
        if isinstance(regenerate_key, (IO, bytes)):
            _content = regenerate_key
        else:
            _json = self._serialize.body(regenerate_key, "StorageAccountRegenerateKeyParameters")

        request = build_regenerate_key_request(
            resource_group_name=resource_group_name,
            account_name=account_name,
            subscription_id=self._config.subscription_id,
            api_version=api_version,
            content_type=content_type,
            json=_json,
            content=_content,
            template_url=self.regenerate_key.metadata["url"],
            headers=_headers,
            params=_params,
        )
        request = _convert_request(request)
        request.url = self._client.format_url(request.url)  # type: ignore

        pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            request, stream=False, **kwargs
        )

        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)

        deserialized = self._deserialize("StorageAccountListKeysResult", pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized

    regenerate_key.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey"}  # type: ignore

    @overload
    async def list_account_sas(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: _models.AccountSasParameters,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> _models.ListAccountSasResponse:
        """List SAS credentials of a storage account.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide to list SAS credentials for the storage account.
         Required.
        :type parameters: ~azure.mgmt.storage.v2016_12_01.models.AccountSasParameters
        :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: ListAccountSasResponse or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.ListAccountSasResponse
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @overload
    async def list_account_sas(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: IO,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> _models.ListAccountSasResponse:
        """List SAS credentials of a storage account.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide to list SAS credentials for the storage account.
         Required.
        :type parameters: IO
        :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: ListAccountSasResponse or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.ListAccountSasResponse
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @distributed_trace_async
    async def list_account_sas(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: Union[_models.AccountSasParameters, IO],
        **kwargs: Any
    ) -> _models.ListAccountSasResponse:
        """List SAS credentials of a storage account.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide to list SAS credentials for the storage account.
         Is either a model type or a IO type. Required.
        :type parameters: ~azure.mgmt.storage.v2016_12_01.models.AccountSasParameters or IO
        :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
         Default value is None.
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: ListAccountSasResponse or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.ListAccountSasResponse
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None))  # type: Optional[str]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.ListAccountSasResponse]

        content_type = content_type or "application/json"
        _json = None
        _content = None
        if isinstance(parameters, (IO, bytes)):
            _content = parameters
        else:
            _json = self._serialize.body(parameters, "AccountSasParameters")

        request = build_list_account_sas_request(
            resource_group_name=resource_group_name,
            account_name=account_name,
            subscription_id=self._config.subscription_id,
            api_version=api_version,
            content_type=content_type,
            json=_json,
            content=_content,
            template_url=self.list_account_sas.metadata["url"],
            headers=_headers,
            params=_params,
        )
        request = _convert_request(request)
        request.url = self._client.format_url(request.url)  # type: ignore

        pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            request, stream=False, **kwargs
        )

        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)

        deserialized = self._deserialize("ListAccountSasResponse", pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized

    list_account_sas.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas"}  # type: ignore

    @overload
    async def list_service_sas(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: _models.ServiceSasParameters,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> _models.ListServiceSasResponse:
        """List service SAS credentials of a specific resource.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide to list service SAS credentials. Required.
        :type parameters: ~azure.mgmt.storage.v2016_12_01.models.ServiceSasParameters
        :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: ListServiceSasResponse or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.ListServiceSasResponse
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @overload
    async def list_service_sas(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: IO,
        *,
        content_type: str = "application/json",
        **kwargs: Any
    ) -> _models.ListServiceSasResponse:
        """List service SAS credentials of a specific resource.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide to list service SAS credentials. Required.
        :type parameters: IO
        :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
         Default value is "application/json".
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: ListServiceSasResponse or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.ListServiceSasResponse
        :raises ~azure.core.exceptions.HttpResponseError:
        """

    @distributed_trace_async
    async def list_service_sas(
        self,
        resource_group_name: str,
        account_name: str,
        parameters: Union[_models.ServiceSasParameters, IO],
        **kwargs: Any
    ) -> _models.ListServiceSasResponse:
        """List service SAS credentials of a specific resource.

        :param resource_group_name: The name of the resource group within the user's subscription. The
         name is case insensitive. Required.
        :type resource_group_name: str
        :param account_name: The name of the storage account within the specified resource group.
         Storage account names must be between 3 and 24 characters in length and use numbers and
         lower-case letters only. Required.
        :type account_name: str
        :param parameters: The parameters to provide to list service SAS credentials. Is either a model
         type or a IO type. Required.
        :type parameters: ~azure.mgmt.storage.v2016_12_01.models.ServiceSasParameters or IO
        :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
         Default value is None.
        :paramtype content_type: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: ListServiceSasResponse or the result of cls(response)
        :rtype: ~azure.mgmt.storage.v2016_12_01.models.ListServiceSasResponse
        :raises ~azure.core.exceptions.HttpResponseError:
        """
        error_map = {
            401: ClientAuthenticationError,
            404: ResourceNotFoundError,
            409: ResourceExistsError,
            304: ResourceNotModifiedError,
        }
        error_map.update(kwargs.pop("error_map", {}) or {})

        _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
        _params = case_insensitive_dict(kwargs.pop("params", {}) or {})

        api_version = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01"))  # type: Literal["2016-12-01"]
        content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None))  # type: Optional[str]
        cls = kwargs.pop("cls", None)  # type: ClsType[_models.ListServiceSasResponse]

        content_type = content_type or "application/json"
        _json = None
        _content = None
        if isinstance(parameters, (IO, bytes)):
            _content = parameters
        else:
            _json = self._serialize.body(parameters, "ServiceSasParameters")

        request = build_list_service_sas_request(
            resource_group_name=resource_group_name,
            account_name=account_name,
            subscription_id=self._config.subscription_id,
            api_version=api_version,
            content_type=content_type,
            json=_json,
            content=_content,
            template_url=self.list_service_sas.metadata["url"],
            headers=_headers,
            params=_params,
        )
        request = _convert_request(request)
        request.url = self._client.format_url(request.url)  # type: ignore

        pipeline_response = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            request, stream=False, **kwargs
        )

        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)

        deserialized = self._deserialize("ListServiceSasResponse", pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized

    list_service_sas.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas"}  # type: ignore


text:
<?php

namespace Google\AdsApi\AdWords\v201609\express;

/**
 * This file was generated from WSDL. DO NOT EDIT.
 */
class Promotion
{

    /**
     * @var int $id
     */
    protected $id = null;

    /**
     * @var string $name
     */
    protected $name = null;

    /**
     * @var string $status
     */
    protected $status = null;

    /**
     * @var \Google\AdsApi\AdWords\v201609\express\Creative[] $creatives
     */
    protected $creatives = null;

    /**
     * @var \Google\AdsApi\AdWords\v201609\express\ExpandedCreative $expandedCreative
     */
    protected $expandedCreative = null;

    /**
     * @var string $destinationUrl
     */
    protected $destinationUrl = null;

    /**
     * @var \Google\AdsApi\AdWords\v201609\express\PhoneNumber $phoneNumber
     */
    protected $phoneNumber = null;

    /**
     * @var boolean $streetAddressVisible
     */
    protected $streetAddressVisible = null;

    /**
     * @var boolean $callTrackingEnabled
     */
    protected $callTrackingEnabled = null;

    /**
     * @var \Google\AdsApi\AdWords\v201609\cm\Money $budget
     */
    protected $budget = null;

    /**
     * @var \Google\AdsApi\AdWords\v201609\cm\Criterion[] $criteria
     */
    protected $criteria = null;

    /**
     * @var long[] $campaignIds
     */
    protected $campaignIds = null;

    /**
     * @param int $id
     * @param string $name
     * @param string $status
     * @param \Google\AdsApi\AdWords\v201609\express\Creative[] $creatives
     * @param \Google\AdsApi\AdWords\v201609\express\ExpandedCreative $expandedCreative
     * @param string $destinationUrl
     * @param \Google\AdsApi\AdWords\v201609\express\PhoneNumber $phoneNumber
     * @param boolean $streetAddressVisible
     * @param boolean $callTrackingEnabled
     * @param \Google\AdsApi\AdWords\v201609\cm\Money $budget
     * @param \Google\AdsApi\AdWords\v201609\cm\Criterion[] $criteria
     * @param long[] $campaignIds
     */
    public function __construct($id = null, $name = null, $status = null, array $creatives = null, $expandedCreative = null, $destinationUrl = null, $phoneNumber = null, $streetAddressVisible = null, $callTrackingEnabled = null, $budget = null, array $criteria = null, array $campaignIds = null)
    {
      $this->id = $id;
      $this->name = $name;
      $this->status = $status;
      $this->creatives = $creatives;
      $this->expandedCreative = $expandedCreative;
      $this->destinationUrl = $destinationUrl;
      $this->phoneNumber = $phoneNumber;
      $this->streetAddressVisible = $streetAddressVisible;
      $this->callTrackingEnabled = $callTrackingEnabled;
      $this->budget = $budget;
      $this->criteria = $criteria;
      $this->campaignIds = $campaignIds;
    }

    /**
     * @return int
     */
    public function getId()
    {
      return $this->id;
    }

    /**
     * @param int $id
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setId($id)
    {
      $this->id = $id;
      return $this;
    }

    /**
     * @return string
     */
    public function getName()
    {
      return $this->name;
    }

    /**
     * @param string $name
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setName($name)
    {
      $this->name = $name;
      return $this;
    }

    /**
     * @return string
     */
    public function getStatus()
    {
      return $this->status;
    }

    /**
     * @param string $status
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setStatus($status)
    {
      $this->status = $status;
      return $this;
    }

    /**
     * @return \Google\AdsApi\AdWords\v201609\express\Creative[]
     */
    public function getCreatives()
    {
      return $this->creatives;
    }

    /**
     * @param \Google\AdsApi\AdWords\v201609\express\Creative[] $creatives
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setCreatives(array $creatives)
    {
      $this->creatives = $creatives;
      return $this;
    }

    /**
     * @return \Google\AdsApi\AdWords\v201609\express\ExpandedCreative
     */
    public function getExpandedCreative()
    {
      return $this->expandedCreative;
    }

    /**
     * @param \Google\AdsApi\AdWords\v201609\express\ExpandedCreative $expandedCreative
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setExpandedCreative($expandedCreative)
    {
      $this->expandedCreative = $expandedCreative;
      return $this;
    }

    /**
     * @return string
     */
    public function getDestinationUrl()
    {
      return $this->destinationUrl;
    }

    /**
     * @param string $destinationUrl
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setDestinationUrl($destinationUrl)
    {
      $this->destinationUrl = $destinationUrl;
      return $this;
    }

    /**
     * @return \Google\AdsApi\AdWords\v201609\express\PhoneNumber
     */
    public function getPhoneNumber()
    {
      return $this->phoneNumber;
    }

    /**
     * @param \Google\AdsApi\AdWords\v201609\express\PhoneNumber $phoneNumber
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setPhoneNumber($phoneNumber)
    {
      $this->phoneNumber = $phoneNumber;
      return $this;
    }

    /**
     * @return boolean
     */
    public function getStreetAddressVisible()
    {
      return $this->streetAddressVisible;
    }

    /**
     * @param boolean $streetAddressVisible
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setStreetAddressVisible($streetAddressVisible)
    {
      $this->streetAddressVisible = $streetAddressVisible;
      return $this;
    }

    /**
     * @return boolean
     */
    public function getCallTrackingEnabled()
    {
      return $this->callTrackingEnabled;
    }

    /**
     * @param boolean $callTrackingEnabled
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setCallTrackingEnabled($callTrackingEnabled)
    {
      $this->callTrackingEnabled = $callTrackingEnabled;
      return $this;
    }

    /**
     * @return \Google\AdsApi\AdWords\v201609\cm\Money
     */
    public function getBudget()
    {
      return $this->budget;
    }

    /**
     * @param \Google\AdsApi\AdWords\v201609\cm\Money $budget
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setBudget($budget)
    {
      $this->budget = $budget;
      return $this;
    }

    /**
     * @return \Google\AdsApi\AdWords\v201609\cm\Criterion[]
     */
    public function getCriteria()
    {
      return $this->criteria;
    }

    /**
     * @param \Google\AdsApi\AdWords\v201609\cm\Criterion[] $criteria
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setCriteria(array $criteria)
    {
      $this->criteria = $criteria;
      return $this;
    }

    /**
     * @return long[]
     */
    public function getCampaignIds()
    {
      return $this->campaignIds;
    }

    /**
     * @param long[] $campaignIds
     * @return \Google\AdsApi\AdWords\v201609\express\Promotion
     */
    public function setCampaignIds(array $campaignIds)
    {
      $this->campaignIds = $campaignIds;
      return $this;
    }

}

redpajama_set_name: RedPajamaGithub


text:
Compilazione previsioni

         <?php
          if(isset($messaggioerrore))  {
            echo '

';
            echo '

                  <button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>';
            echo $messaggioerrore;
            echo '

';
          }
        ?>

          <?php echo form_open('site/conferma_dati', array('class' => 'form-horizontal form-label-left')); ?>

                Data previsione
                Ora previsione
                Zona
                Fascia Oraria
                Previsione
                Allerta

              <?php // Formattazione delle date
                $oggi = date('d-m-Y', strtotime($dati_previsione[0]->Data));
                $domani = date('d-m-Y',strtotime($oggi.' +'."1".' days'));
              ?>
              <?php if(isset($previsioni)) : foreach($previsioni as $row): ?>

                <?php echo $oggi; ?>
                <?php echo $dati_previsione[0]->Ora; ?>
                <?php echo $row->zona; ?>

                  <?php
                    switch ($row->ID_fasciaoraria) {
                      case "1": echo "Dalle 12:00 alle 15:00 del "; echo $oggi; break;
                      case "2": echo "Dalle 15:00 alle 18:00 del "; echo $oggi; break;
                      case "3": echo "Dalle 18:00 alle 21:00 del "; echo $oggi; break;
                      case "4": echo "Dalle 21:00 alle 24:00 del "; echo $oggi; break;
                      case "5": echo "Dalle 00:00 alle 03:00 del "; echo $domani; break;
                      case "6": echo "Dalle 03:00 alle 06:00 del "; echo $domani; break;
                      case "7": echo "Dalle 06:00 alle 09:00 del "; echo $domani; break;
                      case "8": echo "Dalle 09:00 alle 12:00 del "; echo $domani; break;
                      case "9": echo "Dalle 12:00 alle 15:00 del "; echo $domani; break;
                      case "10": echo "Dalle 15:00 alle 18:00 del "; echo $domani; break;
                      case "11": echo "Dalle 18:00 alle 21:00 del "; echo $domani; break;
                      case "12": echo "Dalle 21:00 alle 24:00 del "; echo $domani; break;
                      default: break;
                    }
                  ?>

                  <?php
                    switch ($row->ID_tipoprevisione) {
                      case "0": echo "No temporali"; break;
                      case "1": echo "Temporali sparsi"; break;
                      case "2": echo "Temporali diffusi"; break;
                      default: break;
                    }
                  ?>

                  <?php
                    switch ($row->ID_tipoprevisione) {
                      case "0": echo "Verde"; break;
                      case "1": echo "Gialla"; break;
                      case "2": echo "Arancione"; break;
                      default: break;
                    }
                  ?>

              <?php endforeach; ?>
              <?php else : ?>

 Non ci sono previsioni effettuate da questo utente.

              <?php endif; ?>

          <?php if(isset($previsioni)) : ?>
            <?php if(isset($inTurno)) : ?>

                    <?php
                      if ($inTurno == 1) {echo "Oggi sei di turno"; }
                      else if ($inTurno == 0) {echo "Oggi non sei di turno"; }
                    ?>

            <?php endif; ?>
          <?php endif; ?>

            <button type="submit" class="btn btn-success submit pull-right">Conferma previsioni</button>
            <?php echo anchor('site/ricompila_previsioni', 'Indietro', array('class' => 'btn btn-primary pull-right')); ?>
            <?php echo anchor('CreaPDF/crea_bollettino', 'Scarica PDF', array('class' => 'btn btn-default pull-right')); ?>
            <button type="button" class="btn btn-danger pull-right" data-toggle="modal" data-target=".bs-example-modal-sm">Annulla previsioni</button>

                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">×
                    </button>

Conferma annullamento

Vuoi davvero annullare le tue previsioni di oggi? L'operazione non è reversibile.

                    <button type="button" class="btn btn-default" data-dismiss="modal">NO</button>
                    <?php echo anchor('site/annulla_previsioni', 'SI', array('class' => 'btn btn-primary')); ?>

            <?php echo form_close(); ?>

  Zone di vigilanza

          <img src="<?php echo base_url();?>images/Immagine.jpg">


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class jade.lang.acl.MessageTemplate (JADE v4.3.1 API)</title>
<meta name="date" content="2013-12-04">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
jade.lang.acl.MessageTemplate

Packages that use MessageTemplate

Package
Description

jade.core

This package contains the microkernel of JADE
system.

jade.core.behaviours

This package is a subpackage of jade.core and contains
the classes used to implement basic agent
behaviours.

jade.lang.acl

This package contains the support for the FIPA Agent Communication Language (ACL)
including the ACLMessage class, the parser, the encoder, and
an helper class for representing templates of ACL messages.

jade.proto

This package contains role behaviours for FIPA
standard protocols.

jade.proto.states

This package contains classes for common states of an interaction protocol, such
as  "waiting for a given message",  "selecting between a number of alternatives", ...

Uses of MessageTemplate in jade.core

Methods in jade.core with parameters of type MessageTemplate

Modifier and Type
Method and Description

ACLMessage
Agent.blockingReceive(MessageTemplate pattern)

Receives an ACL message matching a given message
         template.

ACLMessage
Agent.blockingReceive(MessageTemplate pattern,
               long millis)

Receives an ACL message matching a given message template,
         waiting at most a specified time.

ACLMessage
MessageQueue.receive(MessageTemplate pattern)

Return and remove the first message that matches the
 specified message template.

ACLMessage
Agent.receive(MessageTemplate pattern)

Receives an ACL message matching a given template.

Uses of MessageTemplate in jade.core.behaviours

Methods in jade.core.behaviours with parameters of type MessageTemplate

Modifier and Type
Method and Description

void
OntologyServer.setMessageTemplate(MessageTemplate template)

Uses of MessageTemplate in jade.lang.acl

Methods in jade.lang.acl that return MessageTemplate

Modifier and Type
Method and Description

static MessageTemplate
MessageTemplate.and(MessageTemplate op1,
   MessageTemplate op2)

Logical and between two MessageTemplate
         objects.

MessageTemplate
ConversationList.getMessageTemplate()

Return a template that matches only messages that do not belong to
           any of the conversations in this list.

static MessageTemplate
MessageTemplate.MatchAll()

This Factory Method returns a message template that
         matches any message.

static MessageTemplate
MessageTemplate.MatchContent(java.lang.String value)

This Factory Method returns a message template that
         matches any message with a given :content slot.

static MessageTemplate
MessageTemplate.MatchConversationId(java.lang.String value)

This Factory Method returns a message template that
         matches any message with a given :conversation-id slot.

static MessageTemplate
MessageTemplate.MatchCustom(ACLMessage msg,
           boolean matchPerformative)

This Factory Method returns a message template that
         matches ACL messages against a given one, passed as
         parameter.

static MessageTemplate
MessageTemplate.MatchEncoding(java.lang.String value)

This Factory Method returns a message template that
         matches any message with a given :encoding slot.

static MessageTemplate
MessageTemplate.MatchInReplyTo(java.lang.String value)

This Factory Method returns a message template that
         matches any message with a given :in-reply-to slot.

static MessageTemplate
MessageTemplate.MatchLanguage(java.lang.String value)

This Factory Method returns a message template that
         matches any message with a given :language slot.

static MessageTemplate
MessageTemplate.MatchOntology(java.lang.String value)

This Factory Method returns a message template that
         matches any message with a given :ontology slot.

static MessageTemplate
MessageTemplate.MatchPerformative(int value)

This Factory Method returns a message template that
         matches any message with a given performative.

static MessageTemplate
MessageTemplate.MatchProtocol(java.lang.String value)

This Factory Method returns a message template that
         matches any message with a given :protocol slot.

static MessageTemplate
MessageTemplate.MatchReceiver(AID[] values)

This Factory Method returns a message template that
         matches any message with a given :receiver slot.

static MessageTemplate
MessageTemplate.MatchReplyByDate(java.util.Date value)

This Factory Method returns a message template that
         matches any message with a given :reply-by slot.

static MessageTemplate
MessageTemplate.MatchReplyTo(AID[] values)

This Factory Method returns a message template that
         matches any message with a given :reply-to slot.

static MessageTemplate
MessageTemplate.MatchReplyWith(java.lang.String value)

This Factory Method returns a message template that
         matches any message with a given :reply-with slot.

static MessageTemplate
MessageTemplate.MatchSender(AID value)

This Factory Method returns a message template that
         matches any message with a given :sender slot.

static MessageTemplate
MessageTemplate.MatchTopic(AID topic)

This Factory Method returns a message template that
         matches any message about a given topic.

static MessageTemplate
MessageTemplate.not(MessageTemplate op)

Logical not of a MessageTemplate object.

static MessageTemplate
MessageTemplate.or(MessageTemplate op1,
  MessageTemplate op2)

Logical or between two MessageTemplate
         objects.

Methods in jade.lang.acl with parameters of type MessageTemplate

Modifier and Type
Method and Description

static MessageTemplate
MessageTemplate.and(MessageTemplate op1,
   MessageTemplate op2)

Logical and between two MessageTemplate
         objects.

static MessageTemplate
MessageTemplate.not(MessageTemplate op)

Logical not of a MessageTemplate object.

static MessageTemplate
MessageTemplate.or(MessageTemplate op1,
  MessageTemplate op2)

Logical or between two MessageTemplate
         objects.

Uses of MessageTemplate in jade.proto

Methods in jade.proto that return MessageTemplate

Modifier and Type
Method and Description

static MessageTemplate
TwoPhResponder.createMessageTemplate()

This static method can be used to set the proper message Template
 (based on the interaction protocol and the performative) to be passed to the constructor of this behaviour.

static MessageTemplate
SubscriptionResponder.createMessageTemplate(int perf)

This static method can be used
         to set the proper message Template (based on the performative of the
         subscription message) into the constructor of this behaviour.

static MessageTemplate
SimpleAchieveREResponder.createMessageTemplate(java.lang.String iprotocol)

This static method can be used
       to set the proper message Template (based on the interaction protocol
       and the performative)
       into the constructor of this behaviour.

static MessageTemplate
ProposeResponder.createMessageTemplate(java.lang.String iprotocol)

This static method can be used
 to set the proper message template (based on the interaction protocol
 and the performative)
 into the constructor of this behaviour.

static MessageTemplate
ContractNetResponder.createMessageTemplate(java.lang.String iprotocol)

This static method can be used
         to set the proper message Template (based on the interaction protocol
         and the performative) to be passed to the constructor of this behaviour.

static MessageTemplate
AchieveREResponder.createMessageTemplate(java.lang.String iprotocol)

This static method can be used
         to set the proper message Template (based on the interaction protocol
         and the performative)
         into the constructor of this behaviour.

Methods in jade.proto with parameters of type MessageTemplate

Modifier and Type
Method and Description

void
SubscriptionResponder.reset(MessageTemplate mt)

This method resets the protocol and allows to change the
         MessageTemplate
         that defines what messages this SubscriptionResponder
         will react to.

void
SimpleAchieveREResponder.reset(MessageTemplate mt)

This method allows to change the MessageTemplate
       that defines what messages this FIPARequestResponder will react to and reset the protocol.

void
ProposeResponder.reset(MessageTemplate mt)

This method allows to change the MessageTemplate
 that defines what messages this ProposeResponder will react to
 and reset the protocol.

void
AchieveREResponder.reset(MessageTemplate mt)

This method allows to change the MessageTemplate
         that defines what messages this FIPARequestResponder will react to and reset the protocol.

Constructors in jade.proto with parameters of type MessageTemplate

Constructor and Description

AchieveREResponder(Agent a,
                  MessageTemplate mt)

Constructor of the behaviour that creates a new empty DataStore

AchieveREResponder(Agent a,
                  MessageTemplate mt,
                  DataStore store)

Constructor.

ContractNetResponder(Agent a,
                    MessageTemplate mt)

Constructor of the behaviour that creates a new empty DataStore

ContractNetResponder(Agent a,
                    MessageTemplate mt,
                    DataStore store)

Constructor of the behaviour.

ProposeResponder(Agent a,
                MessageTemplate mt)

Constructor of the behaviour that creates a new empty DataStore

ProposeResponder(Agent a,
                MessageTemplate mt,
                DataStore store)

Constructor.

SimpleAchieveREResponder(Agent a,
                        MessageTemplate mt)

Constructor of the behaviour that creates a new empty DataStore

SimpleAchieveREResponder(Agent a,
                        MessageTemplate mt,
                        DataStore store)

Constructor.

SSResponderDispatcher(Agent a,
                     MessageTemplate tpl)

SubscriptionResponder(Agent a,
                     MessageTemplate mt)

Construct a SubscriptionResponder behaviour that handles subscription messages matching a given template.

SubscriptionResponder(Agent a,
                     MessageTemplate mt,
                     SubscriptionResponder.SubscriptionManager sm)

Construct a SubscriptionResponder behaviour that handles subscription messages matching a given template and
 notifies a given SubscriptionManager about subscription/un-subscription events.

SubscriptionResponder(Agent a,
                     MessageTemplate mt,
                     SubscriptionResponder.SubscriptionManager sm,
                     DataStore store)

Construct a SubscriptionResponder behaviour that handles subscription messages matching a given template,
 notifies a given SubscriptionManager about subscription/un-subscription events and uses a given DataStore.

TwoPhResponder(Agent a,
              MessageTemplate mt)

Constructor of the behaviour that creates a new empty DataStore

TwoPhResponder(Agent a,
              MessageTemplate mt,
              DataStore store)

Constructor of the behaviour.

Uses of MessageTemplate in jade.proto.states

Fields in jade.proto.states declared as MessageTemplate

Modifier and Type
Field and Description

protected MessageTemplate
MsgReceiver.template

Methods in jade.proto.states with parameters of type MessageTemplate

Modifier and Type
Method and Description

void
MsgReceiver.reset(MessageTemplate mt,
     long deadline,
     DataStore s,
     java.lang.Object msgKey)

Reset this behaviour, possibly replacing the receive templatt
       and other data.

void
MsgReceiver.setTemplate(MessageTemplate mt)

This method allows modifying the template

Constructors in jade.proto.states with parameters of type MessageTemplate

Constructor and Description

MsgReceiver(Agent a,
           MessageTemplate mt,
           long deadline,
           DataStore s,
           java.lang.Object msgKey)

Constructor.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

These are the official JADE API. For these API backward compatibility is guaranteed accross JADE versions


text:
// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

namespace SharpDX.Toolkit.Graphics
{
    /// <summary>
    /// Represents an effect technique.
    /// </summary>
    public sealed class EffectTechnique : ComponentBase
    {
        private readonly Effect effect;

        internal EffectTechnique(Effect effect, string name)
        {
            Name = name;
            this.effect = effect;
            Passes = new EffectPassCollection();
        }

        /// <summary>
        /// Gets the collection of EffectPass objects this rendering technique requires.
        /// </summary>
        public EffectPassCollection Passes { get; private set; }
    }
}


text:
from .. import resources
from . import managers

from ..commons import Cardinality

class User(resources.EntityResource):
    schema = {
        'username': {
            'type': 'string',
            'required': True,
            'empty': False,
            'minlength': 4
        },
        'email': {
            'type': 'string',
            'required': False,
            'empty': False,
            'index': True
        },
        'password': {
            'type': 'string',
            'required': True,
            'empty': False,
            'minlength': 6,
            'visible': False
        },
    }

    manager_class = managers.UserManager

    @classmethod
    def initialize(cls):
        super().initialize()

class Client(resources.EntityResource):
    schema = {
        'name': {'type': 'string', 'required': True, 'empty': False,
                 'maxlength': 40},
        'description': {'type': 'string', 'required': True, 'empty': False,
                        'maxlength': 400},
        'secret': {'type': 'string', 'required': True, 'empty': False,
                   'maxlength': 55, 'unique': True},
        'confidential': {'type': 'boolean', 'default': True},
        'redirect_uris': {'type': 'list', 'schema': {'type': 'string'}},
        'default_scopes': {'type': 'list', 'schema': {'type': 'string'}}
    }

    manager_class = managers.ClientManager

class Group(resources.EntityResource):
    schema = {
        'name': {
            'type': 'string',
            'required': True,
            'empty': False,
            'minlength': 2
        },
    }

class Token(resources.EntityResource):
    schema = {
        'text': {
            'type': 'string',
            'required': True,
            'empty': False,
        },
        'type': {'type': 'string', 'maxlength': 40},
        'access_token': {'type': 'string', 'maxlength': 255, 'required': True,
                         'empty': False},
        'refresh_token': {'type': 'string', 'maxlength': 255, 'required': True,
                          'empty': False},
        'expires_in': {'type': 'datetime'},
        'scopes': {'type': 'list', 'schema': {'type': 'string'}}
    }

class Grant(resources.EntityResource):
    schema = {
        'code': {'type': 'string', 'maxlength': 255, 'required': True,
                 'empty': False},
        'redirect_uri': {'type': 'string'},
        'expires_in': {'type': 'datetime'},
        'scopes': {'type': 'list', 'schema': {'type': 'string'}}
    }

    manager_class = managers.GrantManager

class ClientGrants(resources.RelationshipResource):
    origin = Client
    target = Grant

    cardinality = Cardinality.one_to_many

class ClientOwner(resources.RelationshipResource):
    origin = User
    target = Client

class GrantOwner(resources.RelationshipResource):
    origin = User
    target = Grant

    cardinality = Cardinality.one

class ClientTokens(resources.RelationshipResource):
    origin = Client
    target = Token

    cardinality = Cardinality.one_to_many

class UserToken(resources.RelationshipResource):
    origin = User
    target = Token

    cardinality = Cardinality.one


text:
package org.hl7.v3;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for RoleClassEmployee.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="RoleClassEmployee">
 *   <restriction base="{urn:hl7-org:v3}cs">
 *     <enumeration value="EMP"/>
 *     <enumeration value="MIL"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "RoleClassEmployee")
@XmlEnum
public enum RoleClassEmployee {

    EMP,
    MIL;

    public String value() {
        return name();
    }

    public static RoleClassEmployee fromValue(String v) {
        return valueOf(v);
    }

}


text:
require "duse/api/v1/actions/authenticated"
require "duse/api/v1/json_views/user"

module Duse
  module API
    module V1
      module Actions
        module User
          class List < Actions::Authenticated
            status 200
            render JSONViews::User

            def call
              Models::User.all
            end
          end
        end
      end
    end
  end
end


text:
package com.amazonaws.services.simpleemail.model.transform;

import javax.xml.stream.events.XMLEvent;
import javax.annotation.Generated;

import com.amazonaws.services.simpleemail.model.*;
import com.amazonaws.transform.Unmarshaller;

import com.amazonaws.transform.StaxUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeStaxUnmarshallers.*;

/**
 * KinesisFirehoseDestination StAX Unmarshaller
 */

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class KinesisFirehoseDestinationStaxUnmarshaller implements Unmarshaller<KinesisFirehoseDestination, StaxUnmarshallerContext> {

    public KinesisFirehoseDestination unmarshall(StaxUnmarshallerContext context) throws Exception {
        KinesisFirehoseDestination kinesisFirehoseDestination = new KinesisFirehoseDestination();
        int originalDepth = context.getCurrentDepth();
        int targetDepth = originalDepth + 1;

        if (context.isStartOfDocument())
            targetDepth += 1;

        while (true) {
            XMLEvent xmlEvent = context.nextEvent();
            if (xmlEvent.isEndDocument())
                return kinesisFirehoseDestination;

            if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

                if (context.testExpression("IAMRoleARN", targetDepth)) {
                    kinesisFirehoseDestination.setIAMRoleARN(StringStaxUnmarshaller.getInstance().unmarshall(context));
                    continue;
                }

                if (context.testExpression("DeliveryStreamARN", targetDepth)) {
                    kinesisFirehoseDestination.setDeliveryStreamARN(StringStaxUnmarshaller.getInstance().unmarshall(context));
                    continue;
                }
            } else if (xmlEvent.isEndElement()) {
                if (context.getCurrentDepth() < originalDepth) {
                    return kinesisFirehoseDestination;
                }
            }
        }
    }

    private static KinesisFirehoseDestinationStaxUnmarshaller instance;

    public static KinesisFirehoseDestinationStaxUnmarshaller getInstance() {
        if (instance == null)
            instance = new KinesisFirehoseDestinationStaxUnmarshaller();
        return instance;
    }
}