How to use the msrest.Serializer function in msrest

To help you get started, we’ve selected a few msrest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / autorest / src / generator / AutoRest.Python.Tests / Expected / AcceptanceTests / CustomBaseUriMoreOptions / auto_rest_parameterized_custom_host_test_client / auto_rest_parameterized_custom_host_test_client.py View on Github external
def __init__(
            self, subscription_id, dns_suffix):

        self.config = AutoRestParameterizedCustomHostTestClientConfiguration(subscription_id, dns_suffix)
        self._client = ServiceClient(None, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '1.0.0'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.paths = PathsOperations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-sdk-for-python / sdk / network / azure-mgmt-dns / azure / mgmt / dns / v2018_05_01 / _dns_management_client.py View on Github external
def __init__(
            self, credentials, subscription_id, base_url=None):

        self.config = DnsManagementClientConfiguration(credentials, subscription_id, base_url)
        super(DnsManagementClient, self).__init__(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '2018-05-01'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.record_sets = RecordSetsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.zones = ZonesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.dns_resource_reference = DnsResourceReferenceOperations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-sdk-for-python / sdk / rdbms / azure-mgmt-rdbms / azure / mgmt / rdbms / mariadb / maria_db_management_client.py View on Github external
def __init__(
            self, credentials, subscription_id, base_url=None):

        self.config = MariaDBManagementClientConfiguration(credentials, subscription_id, base_url)
        super(MariaDBManagementClient, self).__init__(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '2018-06-01'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.servers = ServersOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.replicas = ReplicasOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.firewall_rules = FirewallRulesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.virtual_network_rules = VirtualNetworkRulesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.databases = DatabasesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.configurations = ConfigurationsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.log_files = LogFilesOperations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-sdk-for-python / sdk / storage / azure-storage-file-datalake / azure / storage / filedatalake / _generated / _data_lake_storage_client.py View on Github external
def __init__(self, url, file_system, path1, **kwargs):

        base_url = '{url}'
        self._config = DataLakeStorageClientConfiguration(url, file_system, path1, **kwargs)
        self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '2018-11-09'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.service = ServiceOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.file_system = FileSystemOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.path = PathOperations(
            self._client, self._config, self._serialize, self._deserialize)
github Azure / azure-devops-cli-extension / azure-devops / azext_devops / devops_sdk / v5_0 / security / security_client.py View on Github external
def __init__(self, base_url=None, creds=None):
        super(SecurityClient, self).__init__(base_url, creds)
        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
github Azure / azure-cli-extensions / src / virtual-wan / azext_vwan / vendored_sdks / v2020_05_01 / v2020_05_01 / _network_management_client.py View on Github external
def __init__(
            self, credentials, subscription_id, base_url=None):

        self.config = NetworkManagementClientConfiguration(credentials, subscription_id, base_url)
        super(NetworkManagementClient, self).__init__(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.application_gateways = ApplicationGatewaysOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.application_gateway_private_link_resources = ApplicationGatewayPrivateLinkResourcesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.application_gateway_private_endpoint_connections = ApplicationGatewayPrivateEndpointConnectionsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.application_security_groups = ApplicationSecurityGroupsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.available_delegations = AvailableDelegationsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.available_resource_group_delegations = AvailableResourceGroupDelegationsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.available_service_aliases = AvailableServiceAliasesOperations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-sdk-for-python / sdk / resources / azure-mgmt-resource / azure / mgmt / resource / policy / _policy_client.py View on Github external
from .v2016_12_01.operations import PolicyDefinitionsOperations as OperationClass
        elif api_version == '2017-06-01-preview':
            from .v2017_06_01_preview.operations import PolicyDefinitionsOperations as OperationClass
        elif api_version == '2018-03-01':
            from .v2018_03_01.operations import PolicyDefinitionsOperations as OperationClass
        elif api_version == '2018-05-01':
            from .v2018_05_01.operations import PolicyDefinitionsOperations as OperationClass
        elif api_version == '2019-01-01':
            from .v2019_01_01.operations import PolicyDefinitionsOperations as OperationClass
        elif api_version == '2019-06-01':
            from .v2019_06_01.operations import PolicyDefinitionsOperations as OperationClass
        elif api_version == '2019-09-01':
            from .v2019_09_01.operations import PolicyDefinitionsOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
github Azure / azure-sdk-for-python / azure-mgmt-network / azure / mgmt / network / v2018_08_01 / network_management_client.py View on Github external
def __init__(
            self, credentials, subscription_id, base_url=None):

        self.config = NetworkManagementClientConfiguration(credentials, subscription_id, base_url)
        super(NetworkManagementClient, self).__init__(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.application_gateways = ApplicationGatewaysOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.application_security_groups = ApplicationSecurityGroupsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.available_delegations = AvailableDelegationsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.available_resource_group_delegations = AvailableResourceGroupDelegationsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.azure_firewalls = AzureFirewallsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.azure_firewall_fqdn_tags = AzureFirewallFqdnTagsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.ddos_protection_plans = DdosProtectionPlansOperations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-sdk-for-python / sdk / appservice / azure-mgmt-web / azure / mgmt / web / _web_site_management_client.py View on Github external
"""Instance depends on the API version:

           * 2016-03-01: :class:`ProviderOperations`
           * 2018-02-01: :class:`ProviderOperations`
           * 2019-08-01: :class:`ProviderOperations`
        """
        api_version = self._get_api_version('provider')
        if api_version == '2016-03-01':
            from .v2016_03_01.operations import ProviderOperations as OperationClass
        elif api_version == '2018-02-01':
            from .v2018_02_01.operations import ProviderOperations as OperationClass
        elif api_version == '2019-08-01':
            from .v2019_08_01.operations import ProviderOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
github Azure / azure-sdk-for-python / azure-mgmt-compute / azure / mgmt / compute / compute_management_client.py View on Github external
def galleries(self):
        """Instance depends on the API version:

           * 2018-06-01: :class:`GalleriesOperations`
           * 2019-03-01: :class:`GalleriesOperations`
        """
        api_version = self._get_api_version('galleries')
        if api_version == '2018-06-01':
            from .v2018_06_01.operations import GalleriesOperations as OperationClass
        elif api_version == '2019-03-01':
            from .v2019_03_01.operations import GalleriesOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))